How to Extract a Custom Text Tag from an Excel Cell
Question details
Automatically find specific text tags (such as WRC1 or WRC67) in product titles and return them in a separate Excel column to avoid manual reporting.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Processing product title reports that contain unique identifiers or tags that need to be isolated into their own data column.
- Observed behavior
- Currently, reports are being filtered manually to identify and organize the tags, which is time-consuming and inefficient.
Identify the exact pattern of the text tags you want to extract, such as whether they always appear at the very end of the text string or if they share a common prefix like 'WRC'.
Use the TEXTAFTER Function for End-of-String Tags
This method is ideal for newer versions of Excel when the target tag is always the last word in the cell.
The TEXTAFTER function provides a clean and simple way to extract everything that follows a specific delimiter. In this case, we use a space as the delimiter and search backwards to grab the final word.
Click on the first cell in your new column where you want the extracted tag to appear (e.g., cell B2).
Type the formula =TEXTAFTER(A2," ",-1) into the formula bar. The '-1' tells Excel to search from right to left and extract everything after the very last space.
Press Enter to execute the formula, then double-click or drag the fill handle at the bottom-right corner of the cell to populate the rest of your list.

Use the MID and SEARCH Functions for Universal Compatibility
A reliable method for older versions of Excel or when you need to extract tags based on a specific text prefix.
Extract Text Tags Easily with WPS Spreadsheet
WPS Spreadsheet supports a vast library of advanced text processing functions, including MID, SEARCH, and modern string extraction arrays, allowing you to instantly automate your product reports.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your .xlsx file that contains the unformatted product titles.
- 2. Enter the text extraction formula: In an empty column, type the formula =MID(A2,SEARCH(" WRC",A2)+1,99) into the cell directly next to your first product title.
- 3. Auto-fill the remaining rows: Press Enter, then drag the green fill handle in the bottom-right corner of the cell downwards to extract the tags from the entire dataset automatically.

Frequently Asked Questions
How do I extract a text tag if it appears in the middle of a string instead of the end?
If the tag is surrounded by spaces in the middle of the text, you can use a combination of MID, SEARCH, and FIND functions to pinpoint both the start and end positions of the tag based on the space delimiters.
Why is the SEARCH function returning a #VALUE! error?
The #VALUE! error occurs when the SEARCH function cannot find the specified text pattern (such as ' WRC') within the target cell. Make sure the text exactly matches your formula and check for hidden spaces.
Is there a way to extract text tags from cells without using formulas?
Yes, you can use the Flash Fill feature. Manually type the extracted tag in the adjacent column for the first one or two rows, select the column, and press Ctrl+E (or navigate to Data > Flash Fill) to let the software auto-detect the pattern and fill the rest.




