Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Behaviour of VBA ROUND function
Hi all,
I have a question of dealing with VBA ROUND function, the question is that it doesn't do the rounding consistently. For example: ROUND(100.5) - 100 ROUND(100.6) - 101 ROUND(100.55,1) - 100.6 Why is that? Is it a bug? Please advise. Frederick Chow Hong Kong. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Behaviour of VBA ROUND function
Hi
maybe: http://www.xldynamic.com/source/xld.Rounding.html#vba -- Regards Frank Kabel Frankfurt, Germany "Microsoft Forum" schrieb im Newsbeitrag ... Hi all, I have a question of dealing with VBA ROUND function, the question is that it doesn't do the rounding consistently. For example: ROUND(100.5) - 100 ROUND(100.6) - 101 ROUND(100.55,1) - 100.6 Why is that? Is it a bug? Please advise. Frederick Chow Hong Kong. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Behaviour of VBA ROUND function
How about rounding to the next even value. Wouldn't that be consistent?
? round(101.5) 102 ? round(100.5) 100 ? round(101.5) 102 ? round(102.5) 102 ? round(103.5) 104 ? round(100.55,1) 100.6 ? round(100.45,1) 100.4 Is it a bug? No http://support.microsoft.com/default...b;en-us;194983 PRB: Round Function different in VBA 6 and Excel Spreadsheet -- Regards, Tom Ogilvy "Microsoft Forum" wrote in message ... Hi all, I have a question of dealing with VBA ROUND function, the question is that it doesn't do the rounding consistently. For example: ROUND(100.5) - 100 ROUND(100.6) - 101 ROUND(100.55,1) - 100.6 Why is that? Is it a bug? Please advise. Frederick Chow Hong Kong. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Behaviour of VBA ROUND function
This might be of interest as well:
http://support.microsoft.com/default...b;en-us;196652 How To Implement Custom Rounding Procedures -- Regards, Tom Ogilvy "Microsoft Forum" wrote in message ... Hi all, I have a question of dealing with VBA ROUND function, the question is that it doesn't do the rounding consistently. For example: ROUND(100.5) - 100 ROUND(100.6) - 101 ROUND(100.55,1) - 100.6 Why is that? Is it a bug? Please advise. Frederick Chow Hong Kong. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Round Function | Excel Worksheet Functions | |||
Round function | Excel Discussion (Misc queries) | |||
Round up function | Excel Discussion (Misc queries) | |||
Anomolous behaviour of slope function. | Excel Worksheet Functions | |||
help with round function | Excel Worksheet Functions |