J jimblimm Board Regular Joined May 11, 2012 Messages 219 Jun 14, 2012 #1 is there a way to sum digits in a single cell. in a1 4567 result in b1 22 4+5+6+7 i know i could split the single cell a1 into 4 cells then add, but is there a formula to bypass doing so
is there a way to sum digits in a single cell. in a1 4567 result in b1 22 4+5+6+7 i know i could split the single cell a1 into 4 cells then add, but is there a formula to bypass doing so
starl Administrator Joined Aug 16, 2002 Messages 6,080 Office Version 365 Platform Windows Jun 14, 2012 #2 assume the numbers are in A1 Code: <code>=SUMPRODUCT(MID(a1,ROW(OFFSET($A$1,,,LEN(a1))),1)+0) </code> Upvote 0
assume the numbers are in A1 Code: <code>=SUMPRODUCT(MID(a1,ROW(OFFSET($A$1,,,LEN(a1))),1)+0) </code>
J jimblimm Board Regular Joined May 11, 2012 Messages 219 Jun 14, 2012 #3 what if a1 is a formula that calculates a value ex a1 if(b1="","",countif(b10:b2000,"s") which equals 4567 its not giving the right answer but if i manually type 4567 in it does Upvote 0
what if a1 is a formula that calculates a value ex a1 if(b1="","",countif(b10:b2000,"s") which equals 4567 its not giving the right answer but if i manually type 4567 in it does
Rick Rothstein MrExcel MVP Joined Apr 18, 2011 Messages 38,431 Office Version 365 Platform Windows Jun 14, 2012 #4 Give this formula a try... =SUMPRODUCT(1*MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)) Upvote 0
T. Valko Well-known Member Joined May 9, 2009 Messages 16,623 Jun 14, 2012 #5 jimblimm said: what if a1 is a formula that calculates a value ex a1 if(b1="","",countif(b10:b2000,"s") which equals 4567 its not giving the right answer but if i manually type 4567 in it does Click to expand... You might want to test that cell A1 contains a number first: =IF(COUNT(A1),SUMPRODUCT(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0) Last edited: Jun 14, 2012 Upvote 0
jimblimm said: what if a1 is a formula that calculates a value ex a1 if(b1="","",countif(b10:b2000,"s") which equals 4567 its not giving the right answer but if i manually type 4567 in it does Click to expand... You might want to test that cell A1 contains a number first: =IF(COUNT(A1),SUMPRODUCT(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)
S SachinBhanagle New Member Joined Sep 3, 2016 Messages 4 Sep 3, 2016 #6 I want to know how to sum value of one cell without using Macro. Macro & VBA can not be used on Android devices. Actually I am trying to maintain a excel sheet to manage and calculate my expenses.
I want to know how to sum value of one cell without using Macro. Macro & VBA can not be used on Android devices. Actually I am trying to maintain a excel sheet to manage and calculate my expenses.