Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mod function
The VBA "x Mod y" function and the Excel function =Mod(x,y) produce
consistent results when both parameters are positive. When the number, x, is negative, these two functions produce different results. For example the VBA function returns - 1 = -1 Mod 3 and the Excel function returns 2 = Mod(-1, 3) I agree with the Excel function's results. Anyone have any idea why these functions would have different results? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mod function
You decide which explanation is best:-
http://mathforum.org/library/drmath/view/52343.html http://support.microsoft.com/kb/141178 Mike "Carl" wrote: The VBA "x Mod y" function and the Excel function =Mod(x,y) produce consistent results when both parameters are positive. When the number, x, is negative, these two functions produce different results. For example the VBA function returns - 1 = -1 Mod 3 and the Excel function returns 2 = Mod(-1, 3) I agree with the Excel function's results. Anyone have any idea why these functions would have different results? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
User-Defined Function pre-empting Built-in Function? How to undo???? | Excel Programming |