Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 690
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 690
Default add a double digit number together

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default add a double digit number together

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
recognizing double digit numbers in code DB Excel Discussion (Misc queries) 3 March 2nd 07 04:43 PM
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu via OfficeKB.com Excel Worksheet Functions 1 February 21st 07 02:32 PM
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu Excel Worksheet Functions 1 February 21st 07 10:00 AM
Color a single digit in a mult-digit number cell Phyllis Excel Discussion (Misc queries) 6 November 17th 05 12:46 AM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM


All times are GMT +1. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"