How to Use a Formula for MID From Right in Excel
To extract a specific text from the right side of a cell in Excel, you can use a combination of the RIGHT, LEN, and FIND functions, rather than the MID function. Here's a step-by-step guide on how to do this:
- Open Excel and type some text data in column A. For example, "Product-123", "Product-456", "Product-789".
- Click on a blank cell where you want to display the extracted text (for example, B1).
- Type the following formula in the blank cell:
=RIGHT(A1, LEN(A1) - FIND("-", A1))
This formula will extract the text to the right of the hyphen ("-") in the text string.
- Press Enter to apply the formula. The extracted text should now appear in the cell.
- To apply the formula to other cells, click on the cell with the formula (B1), and move your cursor to the bottom-right corner of the cell until it turns into a plus sign (+).
- Click and drag the plus sign down the column to apply the formula to additional cells.
Example
Let's say you have the following data in column A:
A
---------
1 | Product-123
2 | Product-456
3 | Product-789
And you want to extract the numbers after the hyphen ("-") in each cell. You can use the following formula in cell B1:
=RIGHT(A1, LEN(A1) - FIND("-", A1))
After pressing Enter, cell B1 will display "123". To apply the formula to the other cells, follow the steps mentioned above. The result will look like this:
A B
----------------
1 | Product-123 | 123
2 | Product-456 | 456
3 | Product-789 | 789
In this example, the formula extracts the text from the right side of the hyphen ("-") in each cell in column A and displays it in column B.