< Previous lesson | Overview | Next lesson >
=RIGHT()
Extracting a given number of characters from a cells, counting from right
Just like you can use =LEFT() to extract characters from the left, you can use =RIGHT() to extract characters from the right.
Go to cell A1 and enter "Date of birth". Enter these numbers in the cells as shown.
Go to cell B1 and enter "Day of birth".
As you now can see, the cells A1 and B1 both act as column headings -- they describe what kind of data you expect to find below.
Go to cell B2 and type =RIGHT(A2;2) and hit [Enter].
By the way: instead of typing A2 above, you can of course use your mouse and click inside cell A2 after you’ve typed =RIGHT(
Copy down the cells from B2 to the cells B3 and B4. Do this by selecting cell B2 and grab the handle in the lower right corner of the cell and drag it down until you’ve covered B4.
What happened? Your cell B2 should now read "12", correct?
Let’s look a bit closer at what happened here...
What happens is that you instruct Calc to get the 2 last characters (in this case numbers) in cell A2 from right.