Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
in one box I end up with a double digit number. I was these two numbers in
the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
A1 = 37
=SUM(--MID(A1,{1,2},1)) returns 10 (3+7) You'll need to explain in more detail what you mean by: reduced till only one number remains. -- Biff Microsoft Excel MVP "adding double digit numbers" <adding double digit wrote in message ... in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you want to do it with text functions, this seems like a simpler method to me...
=LEFT(H16)+RIGHT(H16) -- Rick (MVP - Excel) "T. Valko" wrote in message ... A1 = 37 =SUM(--MID(A1,{1,2},1)) returns 10 (3+7) You'll need to explain in more detail what you mean by: reduced till only one number remains. -- Biff Microsoft Excel MVP "adding double digit numbers" <adding double digit wrote in message ... in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
this seems like a simpler method to me...
Yeah, me too! -- Biff Microsoft Excel MVP "Rick Rothstein" wrote in message ... If you want to do it with text functions, this seems like a simpler method to me... =LEFT(H16)+RIGHT(H16) -- Rick (MVP - Excel) "T. Valko" wrote in message ... A1 = 37 =SUM(--MID(A1,{1,2},1)) returns 10 (3+7) You'll need to explain in more detail what you mean by: reduced till only one number remains. -- Biff Microsoft Excel MVP "adding double digit numbers" <adding double digit wrote in message ... in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Another way to do it...
=INT(A1/10)+MOD(A1,10) -- Rick (MVP - Excel) "adding double digit numbers" <adding double digit wrote in message ... in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
When you say "reduced till only one number remains", did you mean add the digits together and if that addition resulted in a 2-digit number, add them together and keep doing that until only a single *digit* remains? If so, use this...
=MOD(A1,9)+9*(MOD(A1,9)=0) which will work on any number, not only 2-digit numbers. -- Rick (MVP - Excel) "adding double digit numbers" <adding double digit wrote in message ... in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
till only one number remains.
From Number Theory on 9's... =MOD(A1-1,9)+1 - - - HTH :) Dana DeLouis adding double digit numbers wrote: in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
very nice, Dana
One small caveat, the number needs to be greater than 0. 0 or null return 9 =IF(A1<1,"",=MOD(A1-1,9)+1) -- Regards Roger Govier "Dana DeLouis" wrote in message ... till only one number remains. From Number Theory on 9's... =MOD(A1-1,9)+1 - - - HTH :) Dana DeLouis adding double digit numbers wrote: in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
A couple of things. First, you accidentally left the equal sign in front of
the MOD function when you modified Dana's formula. Second, I agree that 0 should not return 9, but I don't think the empty string is correct either... I would return 0 for 0. If negative numbers do not need to be considered, then this... =IF(A1="","",IF(A1=0,0,MOD(A1-1,9)+1)) And if negative numbers do need to be considered, something like this maybe... =IF(OR(A1<0,A1=""),"",IF(A1=0,0,MOD(A1-1,9)+1)) Another possibility, if negative numbers need to be considered, is to return the sum of the digits without regard to the sign... =IF(A1="","",IF(A1=0,0,MOD(ABS(A1)-1,9)+1)) or, do the above, but return the sign with it (which will save us the test for 0)... =IF(A1="","",SIGN(A1)*(MOD(ABS(A1)-1,9)+1)) -- Rick (MVP - Excel) "Roger Govier" <roger@technology4unospamdotcodotuk wrote in message ... very nice, Dana One small caveat, the number needs to be greater than 0. 0 or null return 9 =IF(A1<1,"",=MOD(A1-1,9)+1) -- Regards Roger Govier "Dana DeLouis" wrote in message ... till only one number remains. From Number Theory on 9's... =MOD(A1-1,9)+1 - - - HTH :) Dana DeLouis adding double digit numbers wrote: in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Rick
A couple of things. First, you accidentally left the equal sign in front of the MOD function when you modified Dana's formula. Yes, my bad. Thanks for picking it up. -- Regards Roger Govier "Rick Rothstein" wrote in message ... A couple of things. First, you accidentally left the equal sign in front of the MOD function when you modified Dana's formula. Second, I agree that 0 should not return 9, but I don't think the empty string is correct either... I would return 0 for 0. If negative numbers do not need to be considered, then this... =IF(A1="","",IF(A1=0,0,MOD(A1-1,9)+1)) And if negative numbers do need to be considered, something like this maybe... =IF(OR(A1<0,A1=""),"",IF(A1=0,0,MOD(A1-1,9)+1)) Another possibility, if negative numbers need to be considered, is to return the sum of the digits without regard to the sign... =IF(A1="","",IF(A1=0,0,MOD(ABS(A1)-1,9)+1)) or, do the above, but return the sign with it (which will save us the test for 0)... =IF(A1="","",SIGN(A1)*(MOD(ABS(A1)-1,9)+1)) -- Rick (MVP - Excel) "Roger Govier" <roger@technology4unospamdotcodotuk wrote in message ... very nice, Dana One small caveat, the number needs to be greater than 0. 0 or null return 9 =IF(A1<1,"",=MOD(A1-1,9)+1) -- Regards Roger Govier "Dana DeLouis" wrote in message ... till only one number remains. From Number Theory on 9's... =MOD(A1-1,9)+1 - - - HTH :) Dana DeLouis adding double digit numbers wrote: in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi. Just for fun ...
I didn't know this, but it appears the proper mathematical term is called "Digital root" One of many... http://en.wikipedia.org/wiki/Digital_root = = = :) Dana DeLouis Roger Govier wrote: Hi Rick A couple of things. First, you accidentally left the equal sign in front of the MOD function when you modified Dana's formula. Yes, my bad. Thanks for picking it up. |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
can the double digit be as negative?
"adding double digit numbers" wrote: in one box I end up with a double digit number. I was these two numbers in the double digit number to be added together and reduced till only one number remains. I think it has something to do with integar numbers? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
recognizing double digit numbers in code | Excel Discussion (Misc queries) | |||
How to validate a cell to insert from 9 digit number to 13 digit number. | Excel Worksheet Functions | |||
How to validate a cell to insert from 9 digit number to 13 digit number. | Excel Worksheet Functions | |||
Color a single digit in a mult-digit number cell | Excel Discussion (Misc queries) | |||
When we enter a 16 digit number (credit card) the last digit chan. | Excel Discussion (Misc queries) |