View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
AmImad? AmImad? is offline
external usenet poster
 
Posts: 5
Default Problem with rounding?

Ok - I should have clarified further:
If the next decimal place <5 then round down.
If the next decimal place is greater than or equal to 5 then round up.
Is it possible to set this condition? If I just display it as a number with
two decimal places I get the lower value (-0.07 as per below).
Thanks again.

"Stephen" wrote:

You still haven't taken on board what was said!

The result of calculating ((50-49.85)/200)
is
0.000749999999999993

Taking your requirements, as the next decimal place is 4 (which is less than
5) it should round down, which it does.

Neither have you said what you require if the next decimal place = 5. You
can't be cavalier about such things and expect it all to just do what you
want. Neither can you arbitrarily change the function to ROUNDUP and expect
that to work for all situations.


"AmImad?" wrote in message
...
Actually... I've still got a similar problem. For my calculations I need
to
round down if the next decimal place is <5, and round up if the next
decimal
place is 5.
Using the figures below, I am running into problems:

Range 0 - 200
Target Value: 50
Input Value: 49.85
Actual error: -0.15
Error as % of range: -0.08 (-0.075)
Using the formula: ROUND((((50-49.85)/200)*100),2)
I get the answer -0.07

That's why I was using the ROUNDUP option.
Is there a way to get around this?
Thanks again


"AmImad?" wrote:

Hi
I use excel for calculating calibration errors based on range/target
value/actual value, and then round the answers to two decimal places. I
have
noticed some errors where the figures are being rounded too high. Please
see
example below:

Range 0 - 200
Target Value: 100
Input Value: 99.94
Actual error: -0.06
Error as % of range: -0.03
Using the formula: ROUNDUP((((100-99.94)/200)*100),2)
I get the answer -0.04

Can you tell me if I'm doing something wrong?!
Thank you.