Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've been working on this for the good portion of today and Im very baffled.
I'm probably overlooking something very simple. Anyway I need to get the mod of some very very large numbers. So large I need to split it down into smaller componants just to load it into a double (Im doing this all for fun. I just really want to figure this out because there must be a way). Anyway, so I've split the number into a much smaller number 1.9923E+130 approximately. I need to mod this number by a variable that can reach well into the 60,000s. Unfortunately as far as I can tell the Mod operator is only capable of returning an integer. I believe integers can only go up to 16k or 32k. Right now building and testing the program Im modding this 1.9923E+130 by 17947. I keep getting a variable overflow message. I've attempted to write my own Mod function which needed its own Truncate function (Does VBA even that the ability to truncate?!). It works find on smaller numbers. Something well into the quintillians I believe. But when it faces by 1.9923E+130 my truncate function returns a 1. Okay, well my truncate function is probably doing it all wrong. Its basically: Arr = Split(number, "." trunc = Arr(0) My Mod function is something along the lines of: number = number / divisor TruncNum = trunc(number) fMod = (number - TruncNum) * divisor So if anyone has any suggestions or sollutions please let me know. If pursuing this little project of mine is just rediculous please let me know too. I've been having fun thusfar minus the arteries which may have ruptured in my head. Blah. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Truncate | Excel Discussion (Misc queries) | |||
How do you truncate 2.22 to just 0.22? | Excel Worksheet Functions | |||
How do I truncate something like this? | Excel Discussion (Misc queries) | |||
truncate | Excel Worksheet Functions | |||
Truncate | Excel Programming |