Excel Right, Left and Mid functions return number of characters from selected text. These formulas can be used to get a pattern of characters from string. These formulas have same syntax in Excel 2003, 2010, 2007 and 2013. Lets start with Right Function:
Excel Right Function
Excel Right function returns specific number of characters of selected text from right side.
Syntax And Examples:
=RIGHT(“Text”, Count of characters to be returned)
A | |
1 | ExcelBee.com |
2 | |
3 | =RIGHT(A1,3) |
Result in A3: com
In the above example, formula in A3 has returned 3 characters from text in A1 from right side.
Excel Left Function
Excel Left function returns specific number of characters of selected text from left side.
Syntax And Examples:
=LEFT(“Text”, Count of characters to be returned)
A | |
1 | ExcelBee.com |
2 | |
3 | =LEFT(A1,3) |
Result in A3: Exc
In the above example, Left formula in A3 has returned 3 characters from string in A1 from left side.
Excel Mid Function
Excel Mid function returns numbers of characters from middle of a text, starting from the specified character in formula.
Syntax And Examples:
=Mid(“Text”, Starting position, Count of characters to be returned)
A | |
1 | ExcelBee.com |
2 | |
3 | =MID(A1,6,3) |
Result in A3: Bee
In the above example, formula in A3 has returned 3 characters starting from character number 6 from left side.
Extra Tips:
- Number of character to be returned in all three functions must be greater than or equal to zero.
- If number of character to be returned is left blank then only one character will be returned in Right and Left function and zero character in Mid function.
- If number of character to be returned is greater than the length of the text then formula will return whole text only.
Priya Bansal is a seasoned education writer with a passion for creating insightful and engaging content. With a background in education and a knack for research, she excels at producing articles, blogs, and resources that inform and inspire. Priya’s work contributes to the enrichment of educational discourse and empowers learners of all ages.