RIGHT FUNCTION
The RIGHT function in Excel is a powerful tool for text manipulation, often used to extract a specific number of characters from the end of a text string. Whether you are working on data cleaning, formatting, or extracting relevant information, understanding the RIGHT function can make your tasks easier and more efficient.
What is the RIGHT Function in Excel?
The RIGHT function is part of Excel’s text functions category. It allows you to extract a specified number of characters from the end of a text string.
Syntax:
=RIGHT(text, [num_chars])
text (required): The text string from which you want to extract characters.
num_chars (optional): The number of characters to extract from the right. If omitted, it defaults to 1.
Practical Examples of Using the RIGHT Function
Using the RIGHT function to extract a fixed number of characters from the end of a string.

The RIGHT function is a good choice if the goal is to extract a fixed number of characters from the end of a string. In this example, the task is to extract the report frequency from the Report column. Since the frequency takes the last five characters in each report name, the RIGHT function comes in handy.
But what happens if the frequency of any one of the reports changes from Daily to Monthly? Well, you can change the num_chars argument from 5 to 7 wherever required, but that’s not a practical approach. What if you are dealing with a huge list of reports?
Using the LEFT function to extract a varying number of characters from the start of a string.

In this example, the reports are not prepared at the same frequency. Some are created daily, while others are done monthly. This means the number of characters to extract (num_char) will vary for each report.
How do we fix it?
There are two ways to fix this –
- To handle this, we have used a formula with the LEN and FIND functions nested in the RIGHT function to calculate the frequency of each report automatically.

The LEN function returns the total character length of the string in A2.
The FIND function returns the position of the specified character within A2.
- Use the TEXTAFTER function instead of the RIGHT function.
Practical Applications of the RIGHT Function in Excel
- Extract File Extensions
Retrieve file types from file names, e.g., from “document.xlsx,” extract “.xlsx.” - Extract Numbers from Text
Separate numeric IDs or values from text strings, e.g., from “Order12345,” extract “12345.” - Retrieve Last N Characters
Extract specific characters from the end of a string, e.g., from “2023-Q4,” extract “Q4.” - Parse Dates or Times
Isolate time from a combined date-time format, e.g., from “2024-12-31 15:45,” extract “15:45.” - Standardize Data
Extract fixed-length codes or identifiers, e.g., the last 4 digits of a credit card number. - Clean Prefixes
Remove unwanted leading text by retaining only the required part, e.g., from “User_123,” extract “123.” - Separate Delimited Data
Extract the part of a string after the last delimiter, e.g., from “data-final-version,” extract “version.” - Prepare Data for Analysis
Simplify text fields by keeping only the critical trailing information, like product codes or versions. - Extract Units of Measure
From values with units, like “50kg,” extract “kg.” - Dynamic Report Frequency
Calculate report frequency dynamically when the length of relevant data varies. - Shorten URLs or Links
Keep the domain or page name from longer URLs, e.g., from “www.example.com/page,” extract “page.” - Isolate Email Domains
Extract domains from email addresses, e.g., from “user@example.com,” extract “example.com.” - Prepare Formatted Data
Extract trailing characters for creating formatted strings or patterns. - Custom Labels or Tags
Add suffixes or categorize data dynamically by extracting the needed trailing information. - Combine with Other Functions
Use with LEN, FIND, and VALUE to handle complex text-processing tasks.
These practical uses make the RIGHT function a versatile tool for text handling and data preparation in Excel.
The RIGHT function is a straightforward yet powerful tool in Excel. From extracting text to handling complex data manipulation, it provides numerous opportunities to boost productivity and precision. Mastering this function will save you time and significantly improve your data management skills.