Saturday, November 9, 2024
HomeEXCELHow To Sum All Numbers In A Cell in Excel

How To Sum All Numbers In A Cell in Excel

We will see in this post one of the easiest ways, to sum up, all the digits in a number in excel.

Let’s see how we can get the sum of digits in a cell in excel.

We will see a simple formula to find out the sum of all the digits in a number in excel e.g. 11112=1+1+1+1+2=6.

You can do this using two method

  1. Using Formula
  2. Using Macro Custom Function

Read: How To Remove Protected View In Excel

How To Sum All Numbers In A Cell in Excel

Using Formula

Using bellow formula you can easily sum cell numbers

 =IF(COUNT(A8),SUMPRODUCT(--MID(A8,ROW(INDIRECT("1:"&LEN(A8))),1)),0)

Using Macro Custom Function

Public Function SumCellValue(number1 As Double)

CellValue = number1
CountCellValue = Len(CellValue)

CellVT = 0

For RowValue = 1 To CountCellValue
    Char = Mid(CellValue, RowValue, 1)
    CellVT = CellVT + Char
    SumCellValue = CellVT
Next RowValue

End Function
How To Sum All Numbers In A Cell in Excel

If you like this function so kindly share your feedback in bellow comment box.

Ashok Chandra
Ashok Chandra
Hi, I am Ashok Chandra a Blogger by passion from Delhi. During the past 3 years of professional writing, I am writing on the following topics: Blogging, Google AdSense, How To Tutorial, Technology, Tips & Tricks & much more.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments