How to Extract and Sum Values Between Delimiters in Excel
Question details
The user needs to extract specific numeric values located between varying delimiters and a specific text string (like "Mhz"), convert those extracted text values to numbers, and calculate their total sum.

- Product
- Excel / Power Query
- Device & OS
- not provided
- Scenario
- Data cleaning and aggregation from complex text strings containing mixed data types and multiple delimiters.
- Observed behavior
- The user has text strings with numeric values followed by specific units separated by delimiters, and requires an automated method to parse, extract, and sum these specific numbers.
Ensure that your source data formatting is consistent and identify all possible delimiters (such as commas, slashes, or spaces) used in your text strings before applying extraction formulas.
Use Dynamic Formulas (TEXTSPLIT and TEXTBEFORE)
Use modern dynamic array formulas in Excel to split the text, extract the target values, and sum them up in a single cell.
This method leverages the LET function to define variables for step-by-step text manipulation, making the complex extraction process easier to read and calculate instantly without altering the original data.
Click on the cell where you want the total sum of the extracted values to appear.
Type the following formula: =LET(split,TEXTSPLIT([@Merged],{", ","/"}),mhz,TEXTBEFORE(split,"Mhz",,,,0)*1,SUM(mhz))
Modify the [@Merged] part of the formula to match the actual cell reference or table column name of your source data.
Press Enter. The formula will automatically split the source text by the specified delimiters, extract the numbers before 'Mhz', multiply by 1 to convert them to numeric values, and sum the results.

Use Power Query for Large Datasets
For larger, recurring datasets, Power Query provides a robust automated environment to split columns and aggregate data without complex cell formulas.
Extract and Sum Complex Data Efficiently in WPS Office
WPS Spreadsheet provides powerful text manipulation functions, sophisticated arrays, and robust data processing tools to help you extract numbers between varying delimiters and calculate their sums seamlessly.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open the worksheet containing the complex text strings.
- 2. Use the Text to Columns tool: Highlight your data, navigate to the Data tab, select 'Text to Columns', and specify your custom delimiters (like commas or slashes) to split the data.
- 3. Clean the extracted text: Press Ctrl+H to open Find and Replace. Type 'Mhz' in the Find box, leave the Replace box empty, and click 'Replace All' to leave only numbers.
- 4. Sum the final values: Use the standard =SUM() function across the newly cleaned numeric cells to calculate your desired total.

Frequently Asked Questions
Can I extract values between delimiters without using complex dynamic formulas?
Yes, you can use the 'Text to Columns' feature located under the Data tab. By setting your specific delimiters, you can separate the text into multiple columns, remove unwanted text using the Find and Replace tool, and then sum the results manually.
Why is my TEXTSPLIT formula returning a #NAME? error?
The TEXTSPLIT function is a modern dynamic array function. If it returns a #NAME? error, it means your current version of the spreadsheet software does not support this specific function. You may need to update your software version or use Power Query as an alternative.
How do I handle multiple different delimiters in the same cell using formulas?
In the TEXTSPLIT function, you can specify multiple delimiters by wrapping them in an array constant, such as {", ","/"}. This syntax tells the formula to split the text string whenever it encounters any of the specified delimiters within the array.
Does Power Query automatically convert extracted text strings to numbers?
Power Query attempts to detect data types automatically, but when extracting text using mixed delimiters, the result is often formatted as text. You must explicitly change the column data type to 'Whole Number' or 'Decimal Number' before you can perform mathematical operations like summing.




