specific rounding of formulas which may need to include an IF stat

G

Guest

I am currently working on a worksheet where i would like to round the value
in a cell (the cells currently contain a formula which has been rounded to 0
decimal places). The rule being that if the last digit (before the decimal
place) is the number 0, 1,2,3 or 4 then round up the last digit to the digit
5. If the number is 5,6,7,8 or 9 then round up the last digit to 9. I would
like to know how to write this formula.

For example
if the value is 493.75 then round up to 495.
if the value is 498.75 then round up to 499.
if the value is 1233.75 then round up to 1235.
if the value is 1238.75 then round up to 1239.
 
G

Guest

Hi,

Here is one solution:
=IF((A1-TRUNC(A1/10,0)*10)<5,5,9)+TRUNC(A1/10,0)*10

Ola
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top