Function Problems

How to Count the Numbers Added in an Excel Formula

Muhammad TalhaMuhammad Talha Nov 2, 2026 869 views

Question details

The user needs to count how many individual numbers or terms are being added together within a specific Excel formula cell.

How to Count the Numbers Added in an Excel Formula
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.
Before you start

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.

Solution 1Recommended

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.

1
Identify the target cell

Locate the cell containing the addition formula you want to analyze. For example, assume your formula is in cell A2.

2
Enter the counting formula

Click on an empty adjacent cell and type the following formula: =LEN(FORMULATEXT(A2))-LEN(SUBSTITUTE(FORMULATEXT(A2),"+",""))+1

3
Calculate the result

Press the Enter key. Excel will return the total count of the numbers being added in the target cell's formula.

How the formula works: This formula works by finding the total length of the formula text, and then subtracting the length of the formula text after all '+' signs have been removed. This difference gives the exact number of '+' signs. Adding 1 to this number gives the total number of terms being added.
WPS Spreadsheet Solution

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. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing the formulas you want to analyze.
  2. 2. Select an empty cell: Click on a blank cell next to the formula you wish to count the terms for.
  3. 3. Apply the text formula: Input the formula =LEN(FORMULATEXT(target_cell))-LEN(SUBSTITUTE(FORMULATEXT(target_cell),"+",""))+1.
  4. 4. Press Enter: Hit Enter to instantly calculate and display the number of terms in your target formula.
Fully compatible with Microsoft Excel formulas, functions, and file formats.Supports FORMULATEXT for easy formula auditing and text extraction.Lightweight, fast, and completely free to use for daily data processing tasks.
microsoft office alternative - wps office

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.