To find the last character in a string in Excel, use the formula =RIGHT(A1, 1), where A1 is the cell containing your text. This function tells Excel to look at the specified cell and return exactly one character starting from the rightmost side of the string.
Extracting the final character of a data string is a fundamental data cleaning task. Whether you are trying to separate a suffix from a product ID, identify the last digit of a phone number, or determine if a string ends with a specific punctuation mark, the RIGHT function is the most efficient tool for the job. Because Excel reads strings as a sequence of characters, the RIGHT function allows you to isolate the end of that sequence regardless of how long the preceding text is.
What You'll Need
- A computer with Microsoft Excel installed (any version from 2007 to the current Microsoft 365 version).
- A dataset containing text strings, codes, or alphanumeric values in a column.
- A blank column adjacent to your data to house the resulting extracted characters.
Step-by-Step
- Prepare Your Data: Ensure your data is organized in a column. For this example, assume your text strings are located in column A, starting from cell A2 down to A100.
- Select the Target Cell: Click on the first empty cell where you want the result to appear. If your data starts in A2, click on cell B2.
- Enter the Equals Sign: Type
=into the cell. This tells Excel that you are beginning a formula rather than entering static text. - Input the RIGHT Function: Type
RIGHT(. This opens the function and prepares Excel to receive the arguments (the data and the number of characters). - Reference the Source Cell: While the parenthesis is open, click on cell A2 (or type
A2). This tells Excel which string it needs to analyze. You will now see=RIGHT(A2. - Define the Character Count: Type a comma to separate the arguments, then type the number
1. This specifies that you only want the single last character. Your formula should now look like=RIGHT(A2, 1). - Close the Formula: Type the closing parenthesis
)and press Enter. The cell will now display the last character of the string in A2. - Apply to the Entire Column: To avoid typing the formula for every row, hover your mouse over the bottom-right corner of cell B2 until the cursor turns into a small black cross (the Fill Handle). Double-click this cross or click and drag it down to the end of your dataset. Excel will automatically adjust the cell reference (A3, A4, A5, etc.) for each row.
- Convert Formulas to Values (Optional): If you plan to delete the original column A, you must first convert the formulas in column B to static values. Select all the results in column B, copy them (Ctrl + C), right-click on the same selection, and choose Paste Special > Values. This removes the dependency on the original string.
Common Mistakes
One of the most frequent errors occurs when users forget that Excel counts spaces as characters. If your data has trailing spaces—invisible gaps at the end of the text—the RIGHT function will return a blank space instead of the actual last letter or number. This often happens when data is imported from external software or web databases.
Another common mistake is confusing the RIGHT function with the RIGHT-to-LEFT reading logic of some languages or trying to use the FIND function to locate the last character. The FIND function is designed to look for a specific character within a string, but it searches from left to right. If you try to use FIND to get the last character, you will likely end up with the position of the first occurrence of that character, not the final one.
Users also sometimes enter the number of characters incorrectly. If you enter =RIGHT(A2, 2), Excel will return the last two characters. While this is useful for state abbreviations or country codes, it will provide incorrect results if your goal is strictly the final character.
Tips
To solve the trailing space issue mentioned earlier, combine the RIGHT function with the TRIM function. The TRIM function removes all leading and trailing spaces from a cell. The formula would look like this: =RIGHT(TRIM(A2), 1). This ensures that Excel ignores any accidental spaces and grabs the actual last visible character.
If you need to perform an action based on what that last character is, wrap the RIGHT function inside an IF statement. For example, if you want to mark a row as "Complete" if the string ends in "C", you can use: =IF(RIGHT(A2, 1)="C", "Complete", "Incomplete"). This turns a simple extraction tool into a powerful data categorization system.
For those working with very large datasets, using a Table (Ctrl + T) is highly recommended. When you enter a formula in a Table column, Excel automatically fills the rest of the column for you, and the formula uses structured references (like [@[ColumnName]]) instead of cell addresses, making the sheet much easier to read and maintain.
Troubleshooting
If the formula returns a #VALUE! error, check to ensure that the cell reference is correct and that you haven't accidentally placed a non-numeric character where the number 1 should be. Ensure there are no typos in the function name.
If the result looks like a blank cell but you can see a character in the source cell, it is almost certainly a trailing space. Test this by clicking into the source cell and pressing the End key on your keyboard; if the cursor lands after the last character, there is a space present. Use the TRIM method described in the Tips section to fix this.
If the formula is simply showing as text (e.g., you see =RIGHT(A2, 1) written in the cell instead of the result), the cell is likely formatted as "Text" instead of "General". To fix this, go to the Home tab, change the Number Format dropdown to "General", then click into the formula bar and press Enter again to force the calculation.
Frequently Asked Questions
Can I find the last character if the string length varies?
Yes. The RIGHT function does not care about the total length of the string. Whether the cell contains three characters or three thousand, =RIGHT(A2, 1) will always isolate only the final character.
How do I find the second-to-last character?
To get the second-to-last character, you can combine LEFT and RIGHT. First, use =LEFT(RIGHT(A2, 2), 1). This tells Excel to take the last two characters and then extract the first character from that two-character result.
Does this work for numbers as well as text?
Yes, but Excel treats the result as text. If you extract the last digit of a number and need to use it in a mathematical calculation, wrap the formula in the VALUE function: =VALUE(RIGHT(A2, 1)).
What happens if the cell is empty?
If the cell is empty, the RIGHT function will simply return an empty string (a blank cell). It will not produce an error unless the cell contains a specific error value like #N/A.
Can I use this to find the last character of a specific word in a sentence?
Not directly. The RIGHT function looks at the very end of the entire cell. To find the last character of a specific word within a sentence, you would first need to use a combination of MID and FIND to isolate that word, then apply the RIGHT function to the result.