Sunday, January 8, 2012

How To Extract Characters From Text String by Using RIGHT Formula?

RIGHT is one of the Most Useful Text Formula in MS Excel. RIGHT returns the Last Character or Characters in a Text String, based on the number of characters you specify.


The Syntax for the RIGHT function is
 =RIGHT(text,[num_chars])



Here 'text' is nothing but the text word or words that contains the characters you want to extract and 'num_chars' specifies the number of characters you want to extract from the RIGHT side of the text.


 =RIGHT("SARAN",2)



It results AN since AN is the last two characters extract from RIGHT, in the given text.


If we want to extract last first 3 Characters then the Formula should be =LEFT("SARAN",3) and it results RAN


In the above example we entered the Text directly into the Formula. Instead of entering directly Text into the Formula we can use Cell Reference also.


Let say SARAN text string is there in A1 cell in the Excel.
And we want to extract last four characters of SARAN in A2 Cell.
Then we should enter the formula in A2 Cell by giving Cell Reference to A1


Then Formula in A2 Cell is =RIGHT(A1,4) and it results ARAN


Exercise


Points To Be Remember
  • 'num_chars' must be greater than or equal to zero
  • If num_chars is greater than the length of text then it results all of the text
  • If you don't put anything as num_chars, then simply it will result the first character of the text
  • Space in the text is also counts as one character
Now you can try your own with more exercises.

If you have any questions about RIGHT formula, please share the same as comment.



How To Extract Characters From Text String by Using LEFT Formula?

No comments:

Post a Comment

Share your comment here..