+ Reply to Thread
Results 1 to 4 of 4

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

  1. #1
    Rich
    Guest

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

    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

  2. #2
    Mark
    Guest

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


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


  3. #3
    Tom Ogilvy
    Guest

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

    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.

    --
    Regards,
    Tom Ogilvy


    --
    regards,
    Tom Ogilvy



    "Rich" wrote:

    > 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


  4. #4
    Rich
    Guest

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

    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.


    "Rich" wrote:

    > 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1