LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Rounding in Excel

Ok my bad
The first example I used was just a random number I was using to "try" to
explain what I want to do. Yes I did want 190 and thats where I guess my
problem lies, it went down to 189 instead of rounding up to 190. Yeah I
realize this is probably a confusing question but the whole thing was
confusing to me so I guess I appreciate you guys helping me out here. I
guess I was looking more at if its displayed in the g9 as .51 then why isn't
it treating it like .51 instead of .5097. But there again my bad.

I tried your mod(...) and it worked.

Thank you very much everyone for your help and next time I will try to
explain myself a little better.

Merry Christmas to everyone (Happy Holidays for the PC people) and Have a
good New Years.



" wrote:

UBR362 wrote:
I inputed the formula that [Sandy] and Bob gave me and it seemed to work
until I plugged in enough changes to the "base amount" that I ended up with a
case where it was
E9 = 183.99 ("Base Amount")
G9 = 189.51 (Adjusted Amount)
I9 = 189.00 (Rounded Amount)


And you wanted 190? The problem is in the ambiguity of your original
posting. You said you wanted to round up for "10.51 and higher" and
round down for "10.50 and lower". The question is: want about between
10.50 and 10.51?

Bob focused on "10.51 and higher". Sandy interpreted you to mean
"round up for any amount greater than 10.50". Apparently, Sandy's
interpretation is closer to your intent. Use Sandy's formula, namely
MOD(...) 0.50.

However, I suspect you actually mean: round up if the __displayed__
value is greater than 10.50. For example, 10.505 (displayed 10.51)
should round up, but 10.5049 (displayed 10.50) should round down.

In that case, modify Sandy's formula as follows:

=if(mod(round(G9,2),1) 0.50, roundup(G9,0), rounddown(G9,0))

Finally, I wonder if you are really trying to implement banker's
rounding. You example rounded 10.50 down to 10.00. What about 11.50?
Do you want 11.00 or 12.00?

Is it a matter of just carrying out more decimal places? What I am seeing
is that the G9 field is being rounded up to 189.51 (acutal is 189.5097).
Would that affect the results of I9 at all?


Yes, that is the problem.

Also, with respect to Bob's v. Sandy's formula, keep in mind that
(binary) computers can represent 0.50 exactly, but not 0.51. So "
0.50" is better than "= 0.51", even after you make the round(G9,2)
change, which might otherwise seem to make the two formulas identical
in effect.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel won't stop rounding numbers. Please help [email protected] Excel Discussion (Misc queries) 9 December 18th 06 07:38 PM
Excel file with hyperlinks takes a long time to open over the network Didier P Links and Linking in Excel 3 July 4th 06 04:39 PM
How do I stop excel from rounding numbers? c-swym Excel Discussion (Misc queries) 6 June 16th 06 02:04 AM
How do I record (.468) time in Excel without it rounding to .5? SuperDav Excel Discussion (Misc queries) 2 May 17th 06 10:43 PM


All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"