How to Count the Numbers Added in an Excel Formula
Question details
The user needs to count how many individual numbers or terms are being added together within a specific Excel formula cell.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Analyzing a cell containing a formula with multiple added terms (e.g., =1+2+3+4+5) to find the total count of those terms without manually counting them.
- Observed behavior
- Excel evaluates the formula and returns the mathematical sum by default, without providing a direct tool to count the number of terms within the formula string itself.
Ensure that the cell you are analyzing contains a standard addition formula (using '+' signs) and that your version of Excel supports the FORMULATEXT function, which was introduced in Excel 2013.
Use Text Functions to Count the Terms in the Formula
Extract the formula as text and count the number of plus signs to determine how many terms are being added.
Excel does not have a built-in function to count formula terms directly. However, by converting the formula to a text string, we can calculate the number of terms by counting the '+' operators and adding 1 to the result.
Locate the cell containing the addition formula you want to analyze. For example, assume your formula is in cell A2.
Click on an empty adjacent cell and type the following formula: =LEN(FORMULATEXT(A2))-LEN(SUBSTITUTE(FORMULATEXT(A2),"+",""))+1
Press the Enter key. Excel will return the total count of the numbers being added in the target cell's formula.
Count Formula Terms Easily in WPS Spreadsheet
WPS Spreadsheet fully supports advanced text functions like FORMULATEXT, LEN, and SUBSTITUTE, allowing you to manipulate and analyze formulas with ease while remaining perfectly compatible with your existing files.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing the formulas you want to analyze.
- 2. Select an empty cell: Click on a blank cell next to the formula you wish to count the terms for.
- 3. Apply the text formula: Input the formula =LEN(FORMULATEXT(target_cell))-LEN(SUBSTITUTE(FORMULATEXT(target_cell),"+",""))+1.
- 4. Press Enter: Hit Enter to instantly calculate and display the number of terms in your target formula.

Frequently Asked Questions
Can I count other operators like subtraction or multiplication?
Yes, you can modify the formula by replacing the '+' sign in the SUBSTITUTE function with '-', '*', or '/' to count how many times those specific mathematical operators appear in the formula.
Why am I getting a #N/A error when using this formula?
The #N/A error occurs if the referenced cell does not actually contain a formula. The FORMULATEXT function only works on cells that begin with an equals (=) sign.
How do I count the total number of individual digits instead of terms?
To count individual digits, you must remove the equals sign and all operators (like plus signs) using nested SUBSTITUTE functions, and then measure the remaining text length using the LEN function.




