Home Privacy Policy Feedback Link to us Site Map Forums

Excel: Right Function


In Excel, the Right function extracts a substring from a string starting from the right-most character.

The syntax for the Right function is:

Right( text, number_of_characters )

text is the string that you wish to extract from.

number_of_characters indicates the number of characters that you wish to extract starting from the right-most character.


Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

For example:

Let's take a look at an example:

Based on the Excel spreadsheet above:

=Right(A1, 4) would return "soup"
=Right(A2, 6) would return "thenet"
=Right("Excel", 3) would return "cel"

VBA Code

The Right function can also be used in VBA code. For example:

Dim LResult As String

LResult = Right("Alphabet",3)

The variable LResult would now contain the value of "bet".