View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.newusers
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default How to round the numeric value?

"Bernard Liengme" wrote:
I think you need =ROUND(A2/0.5,0)*0.5

[....]
number =CEILING(A2,0.5) =MROUND(A2,0.5) =ROUND(A2/0.5,0)*0.5

[....]
1.7 2 1.5 1.5


But Saeed said that 1.7 should become 2. So by your own examples, CEILING
is the only one of those 3 formulas that works for both examples that Saeed
gave. (However, Saeed might have misrepresented his requirements.)

Of course, Saleed could use ROUNDUP(A1*2,0)/2, which should be functionally
equivalent to CEILING(A1,0.5).

I say "should be" because with Excel, one can never be sure. Sh*t happens!
;-)


----- original message -----

"Bernard Liengme" wrote in message
...
I think you need =ROUND(A2/0.5,0)*0.5
Here are examples of results from CEIL, MROUND and ROUND
number =CEILING(A2,0.5) =MROUND(A2,0.5) =ROUND(A2/0.5,0)*0.5
1.45 1.5 1.5 1.5
1.5 1.5 1.5 1.5
1.7 2 1.5 1.5
1.9 2 2 2
2 2 2 2
2.1 2.5 2 2
2.45 2.5 2.5 2.5
2.5 2.5 2.5 2.5

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Salman Saeed" <Salman wrote in message
...
Kindly tell me that how can we round the numeric value?
Example: 1.2 = 1.5, 1.7 = 2.0