Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you only have 2 digits, try this
=SUM(LEFT(A2,1),RIGHT(A2,1)) "Sai Krishna" wrote in message ... Hi, i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks gaurav, this has helped for two digits.
regards krishna "Gaurav" wrote: If you only have 2 digits, try this =SUM(LEFT(A2,1),RIGHT(A2,1)) "Sai Krishna" wrote in message ... Hi, i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
... this has helped for two digits.
Another option for 1-2 digit numbers ... =A1-9*INT(A1/10) -- Dana DeLouis "Sai Krishna" wrote in message ... Thanks gaurav, this has helped for two digits. regards krishna "Gaurav" wrote: If you only have 2 digits, try this =SUM(LEFT(A2,1),RIGHT(A2,1)) "Sai Krishna" wrote in message ... Hi, i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this small UDF:
Function digicount(r As Range) As Integer Dim n As Integer digicount = 0 v = r.Value L = Len(v) For i = 1 To L n = Mid(v, i, 1) digicount = digicount + n Next End Function -- Gary''s Student - gsnu200787 "Sai Krishna" wrote: Hi, i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=SUMPRODUCT(--MID(A4,ROW($A$1:INDEX($A:$A,LEN(A4),1)),1))
-- Wag more, bark less "Sai Krishna" wrote: Hi, i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Thanks a ton Brad. Was looking for something as useful and simple as this. regards krishna "Brad" wrote: =SUMPRODUCT(--MID(A4,ROW($A$1:INDEX($A:$A,LEN(A4),1)),1)) -- Wag more, bark less "Sai Krishna" wrote: Hi, i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You're welcome
-- Wag more, bark less "Sai Krishna" wrote: Thanks a ton Brad. Was looking for something as useful and simple as this. regards krishna "Brad" wrote: =SUMPRODUCT(--MID(A4,ROW($A$1:INDEX($A:$A,LEN(A4),1)),1)) -- Wag more, bark less "Sai Krishna" wrote: Hi, i need to add all the digits in a cell. For example, if I have a number 58 in a cell, the adjacent cell should return a value of 13. regards krishna |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove all but the last seven digits in a cell | Excel Discussion (Misc queries) | |||
How to customize number to 10 digits including 2 digits after deci | Excel Worksheet Functions | |||
Type 3 digits in one cell then automatically move to next cell. | Excel Discussion (Misc queries) | |||
19 Digits in a Cell | Excel Discussion (Misc queries) | |||
12 or more digits in a cell | New Users to Excel |