The RIGHT function can extract specified character(s) from a cell/string starting from the last (right) character.
You just need to refer to the cell where you have original text and specify the numbers of characters which you want to extract from the text string.
In the below example, we have extracted the last five characters from the cell where we have “Jack Brown”.
- text A text or number from which you want to extract some characters.
- num_char Number of characters you want to extract.
In the below example, we have extracted 6 characters using right function.
If you know, how many characters you need to extract from the string, you can simply extract them by using a number.
Let me show you, how we have done this.
First of all, we have used the LEN to get the length of that entire text string, then we used the FIND to get the position number of space between first and last name.
And in the end, we have used both the figures to get the last name.
- You will get an #Value! error on using negative numbers in num_char.
- If you skip specifying num_char, it will assume 1 as default.
- You can’t refer to more than one cell and if you do that, it will return the characters from the top-left cell of the range.