In this tutorial I will describe the functions used to cut pieces of text – LEFT, RIGHT, and MID.
Excel is a powerful spreadsheet program that is widely used in various industries for data management, analysis, and reporting. One of the common tasks in Excel is cutting text, which means removing a portion of text from a cell or string of text. Cutting text can be useful for cleaning up data, separating information into different cells, or extracting specific information from a larger dataset.
How to cut text?
In this article, we will explore different methods to cut text in Excel, including using the Cut command, LEFT, RIGHT, and MID functions. These techniques will help you save time and improve the accuracy of your data analysis and reporting.
In all of the features listed below the text argument, unless it is a reference to a cell or the formula returns the text must be enclosed in quotes!
Formulas to cut text
If you want to cut a certain number of characters from the beginning of a cell, you can use the LEFT function. LEFT function allows you to cut the text portion of the specified length, starting from the beginning (left side). Its syntax is as follows:
LEFT (text; [num_chars])
Type “=LEFT(cell reference, number of characters)” into the formula bar, replacing “cell reference” with the cell containing the text and “number of characters” with the number of characters you want to cut.
If you want to cut a certain number of characters from the end of a cell, you can use the RIGHT function. RIGHT function allows you to cut out the text of a given length from the end of the text (from right). Its syntax is as follows:
RIGHT (text; [num_chars])
Type “=RIGHT(cell reference, number of characters)” into the formula bar, replacing “cell reference” with the cell containing the text and “number of characters” with the number of characters you want to cut.
For both functions num_chars argument is optional. When you ignore it, it will be downloaded by default only one character of text – the first in the event of the LEFT function, the last in the RIGHT function. If num_chars will be greater than the length of the text, the functions return the entire text.
If you want to cut a certain number of characters from the middle of a cell, you can use the MID function. To display a certain number of characters from text starting at a specific location allows MID function. Here’s the syntax:
MID (text; start_num; [num_chars])
start_num is the place from where we want to start cutting operations.
Type “=MID(cell reference, starting position, number of characters)” into the formula bar, replacing “cell reference” with the cell containing the text, “starting position” with the position in the text where you want to start cutting, and “number of characters” with the number of characters you want to cut.
For example, to start from the beginning of the text, type 1 (position of the first character). The argument here num_chars works the same way as in the previous two functions – if the argument start_num total more than the entire text, the function returns characters from the specified position to the end of the text. The following illustration shows how to use the function:
Cutting Pieces of Text After Particular Sign
In this example you will teach yourself how to cut a piece of text after some particular sign.
Sometimes it happens that you receive some strange data. There are some part which you don’t need and it is hard to get rid of them. In this example you have data which begins with product code. Content which you need is after coma (,) sign.
There is a way in Excel to extract substrings. Just use this formula for: =MID(A2,FIND(“,”,A2)+1,LEN(A2)-FIND(“,”,A2)+1)
Paste this formula to your cell to extract data from A1 cell. Drag and drop down to extract data from another cells in A column.
Different formula I know is =TRIM(MID(A2,FIND(“,”,A2,1)+1,100))
It works the same way. There is another proof that you can do the same things in different ways within Excel.