Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Wed, 3 Mar 2010 13:56:09 -0800, "Joe User" <joeu2004 wrote:
The VBA Round function rounds to the nearest even number. That is not quite correct. For example, Round(2.xx,0) is 2 only when 2.xx is exactly 2.50. Round(2.51,0) is 3. I guess putting the formula example after defining the context for that statement and before making that statement made it unclear that that statement applied when the value fell exactly on the midpoint. I thought it was clear that I was referring to midpoint issues, but I guess I'll have to be more careful. "And you did not define what you wanted to do in the event that your value fell exactly on the midpoint. "The general formula, would be Round(n/0.5,0)*0.5 "The VBA Round function rounds to the nearest even number." --ron |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Ron Rosenfeld" wrote:
I thought it was clear that I was referring to midpoint issues [....] "And you did not define what you wanted to do in the event that your value fell exactly on the midpoint. [....] "The VBA Round function rounds to the nearest even number." I concur: I took your latter statement out of context. Mea culpa! But I still think it is important to emphasize the unlikely difference that "banker's rounding" makes in general, IMHO. I think we can let the horse into heaven now. :-) ----- original message ----- "Ron Rosenfeld" wrote in message ... On Wed, 3 Mar 2010 13:56:09 -0800, "Joe User" <joeu2004 wrote: The VBA Round function rounds to the nearest even number. That is not quite correct. For example, Round(2.xx,0) is 2 only when 2.xx is exactly 2.50. Round(2.51,0) is 3. I guess putting the formula example after defining the context for that statement and before making that statement made it unclear that that statement applied when the value fell exactly on the midpoint. I thought it was clear that I was referring to midpoint issues, but I guess I'll have to be more careful. "And you did not define what you wanted to do in the event that your value fell exactly on the midpoint. "The general formula, would be Round(n/0.5,0)*0.5 "The VBA Round function rounds to the nearest even number." --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rounding up to nearest 500 | Excel Discussion (Misc queries) | |||
ROUNDING UP TO NEAREST 9 | Excel Discussion (Misc queries) | |||
rounding to nearest 100 | Excel Worksheet Functions | |||
I need a formula with rounding up & rounding down to the nearest . | Excel Worksheet Functions | |||
Rounding to Nearest 250 | Excel Worksheet Functions |