Function Problems

How to Extract Text Before Mhz Using TEXTSPLIT in Excel

Huma Ashraf ChHuma Ashraf Ch Nov 10, 2026 869 views

Question details

The user needs to extract specific text appearing right before the first occurrence of the marker 'Mhz' from a cell or a range of cells, returning the extracted values as a comma-separated list.

How to Extract Text Before the First Mhz Occurrence with TEXTSPLIT
Product
Microsoft Excel 365
Device & OS
not provided
Scenario
Cleaning and extracting specific data points bounded by a specific word marker from complex text strings.
Observed behavior
The user requires an automated way to parse the strings, as standard Text-to-Columns is insufficient for extracting specific text before a repeating delimiter dynamically.
Before you start

Ensure you are using a spreadsheet version that supports dynamic array functions like TEXTSPLIT, TEXTBEFORE, and TEXTAFTER. Evaluate the delimiters in your source data (like spaces or brackets) as the formulas may need minor adjustments based on your exact text structure.

Solution 1Recommended

Use TEXTSPLIT and TEXTBEFORE for a Single Cell

This method is ideal when you need to extract values from an individual cell using dynamic array formatting to output a comma-separated list.

This formula splits the text based on a specific character, identifies the string before 'Mhz', and outputs it as an array text string.

1
Select destination cell

Click on the empty cell where you want the comma-separated result to appear.

2
Enter the formula

Type the formula: =ARRAYTOTEXT(TOROW(TEXTAFTER(TEXTBEFORE(TEXTSPLIT(A1,"{"),"Mhz"),",",3)))

3
Adjust delimiters

Modify the "{" or "," characters in the formula if your source text separates items with different symbols.

4
Apply formula

Press Enter to generate the text string containing the data found before 'Mhz'.

Use TEXTSPLIT and TEXTBEFORE for a Single Cell
Free Microsoft Office alternative

Use WPS Spreadsheet to Extract Complex Text Data

WPS Spreadsheet fully supports modern dynamic array formulas, allowing you to seamlessly use functions like TEXTSPLIT, TEXTBEFORE, and BYROW. You can easily clean and extract your data without paying for expensive software subscriptions.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook containing the data.
  2. 2. Select output cell: Click on the blank cell where you want to output the extracted text.
  3. 3. Enter dynamic array formula: Type your formula, for example: =ARRAYTOTEXT(TOROW(TEXTAFTER(TEXTBEFORE(TEXTSPLIT(A1,"{"),"Mhz"),",",3))).
  4. 4. Apply and drag: Press Enter to execute the formula and instantly extract your data. You can then copy it down if not using a spilling BYROW function.
Fully compatible with Microsoft Excel xlsx formats and functionsSupports modern dynamic array formulas like TEXTSPLIT, BYROW, and LAMBDALightweight, fast, and features a familiar user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why is my TEXTSPLIT formula returning a #NAME? error?

The #NAME? error typically occurs if your spreadsheet software version does not support dynamic array functions. Ensure you are using Microsoft 365, Office 2021, or the latest updated version of WPS Office.

Can I use TEXTJOIN instead of ARRAYTOTEXT?

Yes. ARRAYTOTEXT automatically adds a space after the comma delimiter. If you want strict comma separation without spaces, replace ARRAYTOTEXT with TEXTJOIN(",",, [your_formula]).

How do I change the extraction marker from 'Mhz' to another word?

Simply replace the text "Mhz" in the TEXTBEFORE, TEXTSPLIT, or FIND arguments of your formula with your desired word enclosed in quotation marks, such as "GHz" or "kg".

Does this method work if the marker appears multiple times in a cell?

The standard TEXTBEFORE function extracts text before the first occurrence of the delimiter by default. If you need it for subsequent occurrences, you can modify the instance number argument (the third parameter) in the TEXTBEFORE function.