Extract data using Left, Right, Mid function in Microsoft Excel

Extract data using Left, Right, Mid function in Microsoft Excel

You may learn more about the string function from this lesson. Extracting various categories of data from a string is occasionally necessary when dealing with spreadsheets. What is a substring, and how does it work? Using a substring, you may extract some data from a specific cell in the text.

In Excel, there is no such function as Substrings; instead, there are LEFT, RIGHT, and MID text functions.

Left Function

Data from the cell on the left is substringed using this method. =LEFT(text, num characters) is the syntax for the Left function, where the text refers to the cell from which you want to extract data. The number of characters to be extracted is specified by Num characters.

 

If we wish to substring the number 4551218 in the video above, we would enter the syntax as follows:

 

If you enter =LEFT(A4, 3), the result will be 455 in your screen.

 

There are just two bits of information that need to be included in the string for this function to work.

Right function

To substring data from the rightmost cell, use this function. It's possible to substring data from a certain cell using the Right function. The syntax for this function is =RIGHT (text, num characters). The number of characters to be extracted is specified by Num characters.

 

If we wish to substring the number 4551218 in the video above, we would enter the syntax as follows:

 

The number 1218 will be shown if you enter =RIGHT (A4, 4)

 

There are just two bits of information that need to be included in the string for this function to work. Syntactically, the Right function is identical to the Left function. The number at the end of the list is chosen here.

 

Mid Function

This function substrings data from the middle of the cell, rather than the left or right. In contrast to the Left and Right functions, which only required two pieces of input, this one requires three pieces to complete the syntax.

 

The following is the MID function syntax: In this case, the text corresponds to the cell from which you wish to extract the string using =MID(text, start num, num characters). The number you wish to begin extracting data from is known as start num. The term "num characters" refers to how many characters you'd want to get out of the output.

 

The number 4551218, for example, may be extracted from the movie using the Syntax as

 

If you use =MID (A4, 3,2), the result will be 51.

Conclusion:

When dealing with vast amounts of data, the Left, Right, and Mid buttons come in handy. In the actual world, it is almost difficult to enter a formula into each and every cell. It is possible to substring a huge quantity of data by applying the formula once for each function in this video tutorial.

Enjoyed this article? Stay informed by joining our newsletter!

Comments

You must be logged in to post a comment.

About Author