Rounding numbers up or down

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet with two worksheets. The one worksheet contants a load
of data and I want the other to get the information and then round the number
to the next highest as soon as it gets to .6 All the other values I would
like it to keep.

The current formula to get the data from the "Totals" worksheet is
=SUMIF(Totals!A:A,B7,Totals!B:B)

I would like it to take the number that it gets and if it is .6 (OF ANY
NUMBER) i want it to round up to the next highest number. If the number is
between 0 and .5 i want it to show that single decimal value.

Hope this makes sense.
 
If the number you want to round is in cell A1 (for your purposes replace A1
with your SUMIF statement), try
=ROUNDUP(A1,MOD(ROUND(A1,2),1)<0.6)

I used ROUND(A1,2) because Excel can have issues w/binary fractions (some
decimals cannot be stored accurately in binary- similar to 1/3 cannot be
represented accurately as a decimal). You may want to change the level of
precision depending on your data.
 

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

Back
Top