is there worksheet Int function to round decimals up instead of do

G

Guest

Hello,

In MSAccess there is a CInt function that rounds decimal numbers up and an
Int function that rounds down. I need to round decimals up in an Excel
worksheet. The Int function rounds down. Is there a worksheet function that
rounds decimal to the next integer value? How to round up?

Thanks,
Rich
 
M

Mark

If cell A! contains the value .0675 then the formula =ROUNDUP(A1,0)
will result in a value of 1.
 
G

Guest

from VBA help on Cint

When the fractional part is exactly 0.5, CInt and CLng always round it to
the nearest even number. For example, 0.5 rounds to 0, and 1.5 rounds to 2.
CInt and CLng differ from the Fix and Int functions, which truncate, rather
than round, the fractional part of a number. Also, Fix and Int always return
a value of the same type as is passed in.



In Excel, there are
round
roundown
roundup
ceiling
floor
Trunc

and a couple of related including mround from the analysis toolpak.
 
G

Guest

Thank you all for your replies. I did look at the help files for all of the
functions mentioned here. My problem is that I am calculating a value from
various other cells, so the roundup/down function won't work because I don't
have the correct arguments. However, I just thought of one option using VBA
- I could write a funciton which returns the correct value and invoke that
function in the worksheet in a formula. I will give that a try.
 

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

Top