Right() function

The Excel RIGHT function extracts a given number of characters from the right side of a supplied text string.

Syntax

The syntax for the RIGHT function in Microsoft Excel is:

RIGHT( text, [num_chars] )

Parameters or Arguments

text

The string that you wish to extract from.

num _chars

Optional. It indicates the number of characters that you wish to extract starting from the right-most character. If this parameter is omitted, only 1 character is returned.

Usage notes

  • Use the RIGHT function when you want to extract characters starting at the right side of text.
  • num_chars is optional and defaults to 1.
  • RIGHT will extract digits from numbers as well.
  • Number formatting is not part of a text and will not be extracted or counted.

Right Function Examples

Column B of the spreadsheet below shows three examples of the Excel Right function.

Formulas:

Results:

Note that in the above examples:

–          The function in cell B1 omits the [num_chars] argument and so in this case, [num_chars] is set to the default value 1.

–          In cell B3, the right function returns the text value “5” (not the numeric value).

Excel Function Home

Text Functions