Function Problems

How to Extract a Custom Text Tag from an Excel Cell

Rana GarciaRana Garcia Oct 22, 2026 869 views

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.

How to Extract a Custom Text Tag from an Excel Cell
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.
Before you start

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'.

Solution 1Recommended

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.

1
Select the destination cell

Click on the first cell in your new column where you want the extracted tag to appear (e.g., cell B2).

2
Enter the TEXTAFTER formula

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.

3
Apply to the entire column

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 TEXTAFTER Function for End-of-String Tags
Version Compatibility: The TEXTAFTER function is only available in Microsoft 365 and modern versions of Excel. For older versions, refer to the MID and SEARCH method below.
WPS Spreadsheet Solutions

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. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your .xlsx file that contains the unformatted product titles.
  2. 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. 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.
Completely free to use with a familiar, easy-to-learn interfaceFully compatible with Microsoft Excel formulas and file formats (.xlsx)Built-in intelligent text processing and data extraction toolsCross-platform support across Windows, Mac, and Linux
microsoft office alternative - wps office

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.