How RIGHT works in Excel? Best RIGHT examples

How RIGHT works in Excel? Best RIGHT examples

If you’ve ever worked with text data in Excel, chances are you’ve encountered the need to extract specific portions of a string. One of the most useful functions for this is RIGHT. It’s a simple yet powerful function that allows you to extract a certain number of characters from the right-hand side of a text string. In this article, I’ll break down how RIGHT works in Excel and provide some of the best RIGHT examples you can apply in your work.

What is the RIGHT function in Excel?

The RIGHT function in Excel is used to extract a specified number of characters from the end of a string. It’s particularly useful when you need to isolate portions of text such as file extensions, last names, or certain suffixes. The basic syntax of RIGHT is:

=RIGHT(text, num_chars)
  • text – The string from which characters will be extracted.
  • num_chars – The number of characters you want to extract from the right-hand side.

If you don’t specify num_chars, Excel assumes it as 1 and extracts just the last character.

Basic Example of RIGHT in Excel

Let’s consider a basic example to understand how RIGHT works.

Text Formula Result
ExcelFunctions =RIGHT(“ExcelFunctions”, 4) tions
Spreadsheet123 =RIGHT(“Spreadsheet123”, 3) 123

As you can see, when you apply RIGHT("ExcelFunctions", 4), it extracts the last four characters, resulting in “tions”. Likewise, extracting the last three characters from “Spreadsheet123” returns “123”.

Using RIGHT with Cell References

Instead of passing a string directly, you can also use cell references. Here’s an example:

=RIGHT(A2, 5)

If cell A2 contains “FinancialReport2024”, the formula will return “2024”.

RIGHT Combined with Other Functions

While RIGHT alone is useful, its true power comes when combined with other functions. Below are some of the best examples.

Extracting File Extensions

Imagine you have a list of filenames, and you need to extract the file extension. You can use RIGHT along with the FIND and LEN functions:

=RIGHT(A2, LEN(A2) - FIND(".", A2))

This retrieves everything after the last period (.), giving you the extension.

Extracting Last Name from Full Name

Suppose you have full names like “John Doe” and need the last name. You can use:

=RIGHT(A2, LEN(A2) - FIND(" ", A2))

This extracts everything after the first space, which works when names are formatted as “First Last”.

Using RIGHT with Numbers

RIGHT works on text, but when dealing with numbers, Excel treats them differently. If you try =RIGHT(12345, 2), Excel may return an error. To ensure proper functionality, convert the number to text using the TEXT function:

=RIGHT(TEXT(A2, "0"), 2)

This ensures numerical values are treated like text, making RIGHT effective.

Common Errors with RIGHT

While RIGHT is straightforward, a few common mistakes can occur:

  • #VALUE! Error – If num_chars is negative, Excel throws an error.
  • Incorrect Output – If applied to numeric cells, RIGHT might not behave as expected unless formatted as text.
  • Formula Too Rigid – If you extract specific character counts without considering variations, your formula may not always work. Using dynamic functions like FIND can help.

Conclusion

Now that you know how RIGHT works in Excel, you can confidently apply it to extract data efficiently. Whether working with filenames, names, or other text data, RIGHT is an essential tool for every Excel user. Combine it with FIND, LEN, and TEXT functions for even greater flexibility. Mastering RIGHT will make handling text in Excel far more intuitive and powerful.

 

Other interesting article:

How LEFT works in Excel? Best LEFT examples