How to Add All Digits in a Mobile Number Using Excel Formulas
Question details
The user needs a dynamic Excel formula to calculate the sum of all individual digits within a given mobile number.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating the digit sum of a mobile number for data analysis or validation purposes.
- Observed behavior
- A single formula is required to extract, convert, and sum each digit from a long string of numbers.
Ensure your spreadsheet software supports dynamic array functions like SEQUENCE. If you are using an older version of Excel, you may need to use an alternative legacy formula.
Use SUM, MID, and SEQUENCE Functions
The most efficient way to sum all digits in a single cell using modern dynamic arrays.
This method uses the SEQUENCE function to generate an array of numbers corresponding to the length of the mobile number. The MID function then extracts each digit, and the double unary (--) converts these text characters into numbers so the SUM function can add them together.
Click on the blank cell where you want the final sum result to be displayed.
Type the formula =SUM(--MID(A1,SEQUENCE(LEN(A1)),1)) into the formula bar. Replace 'A1' with the cell reference that contains your mobile number.
Press the Enter key. The formula will automatically extract and sum up every digit within the mobile number.

Use SUMPRODUCT, MID, ROW, and INDIRECT (For Older Versions)
An alternative formula approach for older versions of Excel that lack support for the SEQUENCE function.
Calculate Digit Sums Easily with WPS Spreadsheet
WPS Spreadsheet fully supports advanced array formulas like SEQUENCE, MID, and SUM, making complex data manipulation and digit-sum calculations incredibly simple and efficient.
- 1. Download and Install: Download WPS Office for free and install it on your computer.
- 2. Open Your Data: Launch WPS Spreadsheet and open the workbook containing your mobile numbers.
- 3. Apply the Formula: Select an empty cell and input the =SUM(--MID(A1,SEQUENCE(LEN(A1)),1)) formula.
- 4. Press Enter: Hit Enter to instantly calculate the sum, then drag the fill handle down to apply it to other rows.

Frequently Asked Questions
Why am I getting a #VALUE! error when using this formula?
This error occurs if the cell contains non-numeric characters (like letters or symbols) that the double unary (--) cannot convert to a number. Ensure the cell contains only digits, or nest a SUBSTITUTE function to remove spaces and hyphens before calculating.
Does this formula work if the mobile number starts with a zero?
Yes. If the number is stored as text and starts with a zero, the LEN function will count the zero, and the MID function will extract it. Since adding zero does not affect the total, the final sum remains completely accurate.
Can I sum the digits of numbers in an entire column at once?
Yes, you can apply the formula to the first cell in an adjacent column and then double-click or drag the fill handle down to copy the formula. The relative cell references will automatically update and calculate the digit sum for each row.




