Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on division
A) 25/5=5 B) 28/5=5.6 I pick up a value and want to test if it is divisible by 5. If the result is not a whole number I need to hold off what ever the count might be, so in case B I would store in some variable 3 from the 28 allowing the calculation to result in 5. I am at a loss as how to test if the result is a whole number and if not how to figure out what to reduce the numerator by. Appreciatively, Arturo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on division
Hi Arturo,
If you're looking for a VBA solution, look at the Mod operator: Debug.Print 25 Mod 5 Debug.Print 28 Mod 5 -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Arturo wrote: A) 25/5=5 B) 28/5=5.6 I pick up a value and want to test if it is divisible by 5. If the result is not a whole number I need to hold off what ever the count might be, so in case B I would store in some variable 3 from the 28 allowing the calculation to result in 5. I am at a loss as how to test if the result is a whole number and if not how to figure out what to reduce the numerator by. Appreciatively, Arturo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on division
There is also a MOD() function for use in a sheet...
-----Original Message----- Hi Arturo, If you're looking for a VBA solution, look at the Mod operator: Debug.Print 25 Mod 5 Debug.Print 28 Mod 5 -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Arturo wrote: A) 25/5=5 B) 28/5=5.6 I pick up a value and want to test if it is divisible by 5. If the result is not a whole number I need to hold off what ever the count might be, so in case B I would store in some variable 3 from the 28 allowing the calculation to result in 5. I am at a loss as how to test if the result is a whole number and if not how to figure out what to reduce the numerator by. Appreciatively, Arturo . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Division | Excel Worksheet Functions | |||
Need help with division, please!!! | Excel Worksheet Functions | |||
Division | New Users to Excel | |||
Division help? | Excel Discussion (Misc queries) | |||
Division help? | Excel Discussion (Misc queries) |