Site icon ExcelNotes

How to Extract the Nth Last Letter

To extract Nth last letter in the text string, you need to use Right Function.

Formula:

Copy the formula and replace "A1" with the cell name that contains the text you would like to extract, and change N to the number you need.

=RIGHT(LEFT(A1,LEN(A1)-N+1),1)

Example:

To extract the sixth letter from text string "How to Extract the Nth Last Letter".

The result returns the six-letter "L".

Explanations:

Step 1: To find the length of the text string

Formula=LEN(A1)
Result34

Step 2: Extract the text from the string without the last 5 letters

Formula=LEFT(A1,LEN(A1)-6+1)
ResultHow to Extract the Nth Last L

Step 3: Extract sixth letter from the last (or the last letter from step 2)

Formula=RIGHT(LEFT(A1,LEN(A1)-6+1),1)
ResultL
Exit mobile version