Function Problems

How to Add All Digits in a Mobile Number Using Excel Formulas

Olivia MillerOlivia Miller Nov 10, 2026 868 views

Question details

The user needs a dynamic Excel formula to calculate the sum of all individual digits within a given mobile number.

How to Add All Digits in a Mobile Number Using Excel Formulas
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target cell

Click on the blank cell where you want the final sum result to be displayed.

2
Enter the formula

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.

3
Calculate the result

Press the Enter key. The formula will automatically extract and sum up every digit within the mobile number.

Use SUM, MID, and SEQUENCE Functions
Handling Special Characters: If the mobile number contains spaces, plus signs, or hyphens, use the SUBSTITUTE function to clean it first. For example: =SUM(--MID(SUBSTITUTE(A1,"-",""),SEQUENCE(LEN(SUBSTITUTE(A1,"-",""))),1)).
Advanced Formula Support

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. 1. Download and Install: Download WPS Office for free and install it on your computer.
  2. 2. Open Your Data: Launch WPS Spreadsheet and open the workbook containing your mobile numbers.
  3. 3. Apply the Formula: Select an empty cell and input the =SUM(--MID(A1,SEQUENCE(LEN(A1)),1)) formula.
  4. 4. Press Enter: Hit Enter to instantly calculate the sum, then drag the fill handle down to apply it to other rows.
Fully compatible with Microsoft Excel formulas and formatting.Supports modern dynamic arrays and functions like SEQUENCE.Lightweight and runs smoothly on Windows, Mac, and Linux.Free to use for everyday spreadsheet and data analysis tasks.
microsoft office alternative - wps office

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.