1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Excel RIGHT Function

Truncate Text Strings in Excel


Truncate Text with Excel's RIGHT Function

Truncate Text with Excel's RIGHT Function

© Ted French

When data is imported or copied into an Excel spreadsheet unwanted characters or words can sometimes be included with the new data.

Excel has several functions that can be used to truncate or remove such unwanted characters. Which function you use depends upon where the unwanted characters are located.

  • If you have unwanted characters on both sides of your good data, use the MID function to remove them.

  • If these unwanted characters appear on the left side of your good data, use the RIGHT function to remove them.

  • If the unwanted characters are on the right side of your good data, use the LEFT function to remove them.

The RIGHT Function

The syntax for the RIGHT function is:

= RIGHT ( Text , Num_chars )

Text - the piece of data you want to change.

This can be a cell reference indicating where the data is stored.

Num_chars - specifies the number of characters to be retained from the Number specified above.

Example Using Excel's RIGHT Function to Truncate Text

  1. Enter the following data into cell C1: #687

  2. Click on cell D1 in the spreadsheet - this is where the function will be located.

  3. Click on the Formulas tab of the ribbon menu.

  4. Choose Text from the ribbon to open the function drop down list.

  5. Click on RIGHT in the list to bring up the function's dialog box.

  6. In the dialog box, click on the Text line.

  7. Click on cell C1 in the spreadsheet.

  8. Click on the Num_chars line.

  9. Enter the number 3 on this line since we only want to keep the three rightmost characters of data.

  10. Click OK.

  11. The number 687 should appear in cell D1.

  12. When you click on cell D1 the complete function = RIGHT ( D1,3 ) appears in the formula bar above the worksheet.

©2014 About.com. All rights reserved.