Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ROUND()
Message
From
08/03/2000 12:04:05
 
 
To
08/03/2000 11:44:02
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00342568
Message ID:
00343308
Views:
27
>I want all my calculations to be to 1 decimal place.
>
>7/74*100 (the sum currently in hand) should = 9.5.
>
>When I do ROUND(7/74*100,0) I get 9 when 9.5 rounded is actually 10.
>
>To explain more, I have a report that calculates various figures and in the totals are the percentages as well. The only problem is that the total does not reach 100%, it reaches 99%.

How about
ROUND( ROUND(7/74*100,1), 0)
which will first round the number to 1 decimal place, then round that result up or down. 7/74*100=9.46, round to 1 decimal=9.5, round to 0 decimals then = 10.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform