Function Problems

How to Sum Excel Cells That Contain Numbers and Text in WPS Office

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

The user needs to sum cells that mix numbers and text, where a direct SUM formula may ignore the numeric portion or return an error.

How to Sum Excel Cells That Contain Numbers and Text in WPS Office
Product
WPS Office Spreadsheet
Device & OS
not provided
Scenario
Data cells contain entries such as "12 apples" and the user wants to total the numeric values embedded in the text.
Observed behavior
Direct SUM formulas may skip these cells or produce errors because WPS Spreadsheet and Excel treat them as text.
Before you start

Check your WPS Office version and identify the delimiter, such as a space, that separates the numbers from the text in the affected cells. If the data has inconsistent delimiters, plan to split the values into helper columns before summing.

Solution 1Recommended

Use an array formula with TEXTBEFORE and IFERROR to extract and sum numbers

Best for a single-cell total when numeric values appear before a consistent delimiter such as a space.

The formula extracts the part of each cell before the delimiter, converts it to a number, ignores errors, and returns the total without changing the original data layout.

1
Select the result cell

Click the cell where you want the sum to appear, such as B1.

2
Enter the summing formula

Type =SUM(IFERROR(--TEXTBEFORE(A1:A10," "),0)) and adjust A1:A10 and the delimiter in quotes to match your data range.

3
Press Enter in WPS Spreadsheet

Press Enter to calculate the result. In current WPS Office versions the formula calculates as an array; in older versions, confirm with Ctrl+Shift+Enter if prompted.

Use an array formula with TEXTBEFORE and IFERROR to extract and sum numbers
Result calculated: WPS Spreadsheet returns the total of the numeric parts and ignores cells that do not contain a matching delimiter.
WPS Spreadsheet formula solution

Sum Numbers Inside Text Cells in WPS Office Spreadsheet

WPS Office Spreadsheet can extract and sum numeric values from mixed text cells with formulas or Text to Columns, so you do not need to manually retype data. It gives you a compatible, familiar spreadsheet environment for Excel files.

  1. 1. Open WPS Office Spreadsheet: Launch WPS Office and open the Excel workbook that contains the mixed number and text cells.
  2. 2. Select a blank result cell: Click a blank cell where you want the total to appear.
  3. 3. Enter the extraction formula: Type =SUM(IFERROR(--TEXTBEFORE(A1:A10," "),0)) and adjust the range and delimiter to match your data.
  4. 4. Press Enter: Press Enter or Ctrl+Shift+Enter if your version requires it to calculate the total.
  5. 5. Check the total: Confirm the result matches the expected sum of the numeric portions.
Formulas such as TEXTBEFORE and IFERROR can extract embedded numbers without changing the original dataText to Columns quickly separates numbers and labels for clean SUM rangesFully compatible with .xlsx and other Microsoft Excel spreadsheet formatsFree, lightweight Office suite with a familiar spreadsheet interfaceEasy migration from Microsoft Excel with no need to relearn core functions
microsoft office alternative - wps office

Frequently Asked Questions

Which formula sums cells that contain both numbers and text?

In WPS Office Spreadsheet you can use =SUM(IFERROR(--TEXTBEFORE(A1:A10," "),0)). Replace A1:A10 with your range and the delimiter with the character that separates the number from the text.

Does WPS Office support the TEXTBEFORE function?

Current WPS Office versions support many modern Excel functions, including TEXTBEFORE. If your version does not list it, use the Data tab > Text to Columns to split the data, or use a helper column with LEFT and FIND to extract the number before summing.

Why does a normal SUM ignore cells with numbers and text?

Cells that contain letters alongside numbers are stored as text. A regular SUM function only adds numeric cells, so those text cells are ignored or may contribute 0 until the number is extracted or the cell is converted to a number.

How can I split numbers and text into separate columns in WPS Office?

Select the cells, go to the Data tab > Text to Columns, choose Delimited, select the delimiter such as a space, and finish the wizard. Then use a simple =SUM on the resulting numeric column.

Is it better to store numbers and text in separate columns?

Yes. Keeping numeric values in one column and labels in another makes formulas like SUM, AVERAGE, and charts work reliably and avoids complex extraction formulas or errors.