The RIGHT function

The RIGHT function is a text function which returns the number of characters you request from the right of the field. This works on all cells, but certain interactions may not work as you intend, for example date values will not return based on the visible output but on the number it represents.

This is the format of the RIGHT function:

=RIGHT(CELL RANGE, NUMBER OF CHARACTERS)

Here is an example of the RIGHT function:

=RIGHT(“Pluto has always been a planet!”, 7) = planet! 
RIGHT function returning the seven rightmost characters from the text string

RIGHT function returning the seven rightmost characters from the text string

This function is valuable when you have fields you would like to dynamically extract values from without needing to use the Text-to-Columns wizard. This could be a product description field, a customer name field, or an address field where only certain components are required.

An example of a functional implementation of this would be to create custom tracking metrics for purchases from your website. You know that you have customers who purchase your products across Canada, and have saved enough to rent out up to two additional warehouse locations. Currently you are shipping products from a hub on the East coast and want to know if it is worth adding a new warehouse. The last piece of information in the customer address field is the province.

ex: customer addresses are column C, and the data starts in row 2

=RIGHT(C2, 2) = BC