RIGHT Function in Excel

Beginner

Returns the last character or characters in a text string, based on the number of characters you specify.

Syntax

=RIGHT(text, [num_chars])

Example

Use Case

Extract the file extension from a filename.

Common Errors to Avoid

  • Doesn't account for varying text lengths automatically
  • Returns #VALUE! if num_chars is negative
  • Trailing spaces are included in the extraction

Pro Tips

Use with LEN and FIND to extract text after a specific character. For file extensions, combine with FIND to locate the last period. Apply TRIM to clean up trailing spaces first.

Need help with this formula?

Our AI Formula Generator can write this for you instantly.

Try AI Formula Generator →
RIGHT Function in Excel | Excel AI Tools