
The LEN function returns the length of text as a count of characters. Use the LEFT function to extract text starting from the left side of the text, and the MID function to extract from the middle of the text. The RIGHT function is used to extract text from the right side of a text string. For example, to extract text in cell A1 to the right of a specific character (char), use RIGHT with the FIND and LEN functions like this: =RIGHT(A1,LEN(A1)-FIND(char,A1)) // text to right charįIND returns the position of the character, and RIGHT returns the text to the right of that position. The RIGHT function is often combined with other functions like LEN and FIND to extract text in more complex formulas. When LEFT is used on a numeric value, the result is text: =RIGHT(1200,3) // returns "200" as text If num_chars exceeds the string length, LEFT returns the entire string: =RIGHT("apple",100) // returns "apple" If the optional argument num_chars is not provided, it defaults to 1: =RIGHT("ABC") // returns "C"

In the example below, we extract the state code "OR" (Oregon) from the string "Portland, OR" =RIGHT("Portland, OR",2) // returns "OR" The second argument, called num_chars, specifies the number of characters to extract. If num_chars is not provided, it defaults to 1. If num_chars is greater than the number of characters available, RIGHT returns the entire text string. The RIGHT function extracts a given number of characters from the right side of a supplied text string.
