Returns text from the right side of a text string.
RIGHT(text, number)
returns number characters from the right side of the text text.
number defaults to 1 if omitted.
RIGHT("output", 3)
returns put.
Extracting Product IDs from a Product Code
Imagine you work for a company that sells electronics. Your product codes are structured in a way that the last 4 characters represent the unique product ID, while the characters before that represent the product category and other information. You have a list of full product codes, and you need to quickly extract only the product ID for inventory management and sales analysis.
Scenario:
You have the following table, where column A contains the full Product Code.
Product Code | ||
|---|---|---|
A | ||
1 | TV-LED-42-2356 | |
2 | AUDIO-HP-BT-4912 | |
3 | LAPTOP-ULTRA-7890 | |
4 | CAM-DSLR-PRO-1122 | |
5 | GADGET-SMART-3456 |
The Goal:
Extract the last four digits from each Product Code and place them in the Product ID column (column B).
The Solution using the RIGHT function:
In cell B1, you would enter the following formula:
RIGHT(A1, 4)
Explanation of the formula:
Final Table:
Product Code | Product ID | ||
|---|---|---|---|
A | B | ||
1 | TV-LED-42-2356 | 2356 | |
2 | AUDIO-HP-BT-4912 | 4912 | |
3 | LAPTOP-ULTRA-7890 | 7890 | |
4 | CAM-DSLR-PRO-1122 | 1122 | |
5 | GADGET-SMART-3456 | 3456 |
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof