This article explains how to use the RIGHT function to remove unwanted characters in Microsoft Excel 2019, 2016, 2013, 2010, and Excel for Microsoft 365.

What to Know

  • Function: =RIGHT(Text,Num_chars), where Text (required) = data and Num_chars (optional) = retained numbers.With Function Dialog Box: Choose destination cell > select Formulas tab > Text > RIGHT > select data cell.Next, select Num_chars line > enter desired number of digits to keep > select Done.

RIGHT Function Syntax and Arguments

In Excel, the syntax of a function refers to the layout and order of the function and its arguments. Arguments are the values functions use to perform calculations.

A function’s syntax includes the function’s name, parentheses, and arguments. The syntax for the RIGHT function is:

=RIGHT(Text,Num_chars)

The function’s arguments tell Excel what data to look at in the function and the length of the string it should extract. Text (required) is the desired data. Use a cell reference to point out the data in the worksheet, or use the actual text in quotation marks.

Num_chars (optional) specifies the number of characters on the right of the string argument that the function should retain. This argument must be greater than or equal to zero. If you input a value that is greater than the length of the text, the function returns all of it.

Using the Function Dialog Box

To make things even simpler, select the function and arguments using the Function Dialog Box, which takes care of the syntax by entering the function’s name, commas, and brackets in the correct locations and quantity.

If you omit the Num_chars argument, the function uses the default value of 1 character.

  • Input the data, as seen above in cell B1. Then select cell C1 to make it the active cell.
  • Using your mouse to select cells helps prevent errors caused by typing in the wrong cell reference.
  • Select the Formulas tab of the ribbon menu.
  • Choose Text from the ribbon to open the function drop-down.
  • Select RIGHT in the list to bring up the Function Dialog Box.
  • Select the Text line.
  • Select cell B1 in the worksheet.
  • Select the Num_chars line.
  • Type in 6 on this line, since we only want to keep the six rightmost characters.
  • Select Done to complete the function.
  • The extracted text Widget should appear in cell C1. When you select cell C1, the complete function appears in the formula bar above the worksheet.

Removing Unwanted Text Characters

The example in the image below uses the RIGHT function to extract the term “Widget” from the longer text entry *&^%Widget located in cell B1 in the worksheet.

Input the data, as seen above in cell B1. Then select cell C1 to make it the active cell.

Using your mouse to select cells helps prevent errors caused by typing in the wrong cell reference.

Select the Formulas tab of the ribbon menu.

Choose Text from the ribbon to open the function drop-down.

Select RIGHT in the list to bring up the Function Dialog Box.

Select the Text line.

Select cell B1 in the worksheet.

Select the Num_chars line.

Type in 6 on this line, since we only want to keep the six rightmost characters.

Select Done to complete the function.

The extracted text Widget should appear in cell C1. When you select cell C1, the complete function appears in the formula bar above the worksheet.

The RIGHT function extracts a certain number of characters from the right side of a text string. If the characters you want to extract are on the left side of the data, use the LEFT function to extract it. If the desired data has unwanted characters on both sides of it, use the MID function to extract it.

The function in cell C1 looks like this: =RIGHT(B1,6)

Get the Latest Tech News Delivered Every Day