+ Reply to Thread
Results 1 to 8 of 8

How to round 8.93 to 8?

  1. #1
    Registered User
    Join Date
    07-11-2007
    Posts
    6

    Red face How to round 8.93 to 8?

    I have series of real numbers ranging from 0 to 20. I can't seem to figure out the way to rounddown all of them. For example, I need "7.93" to round to the lowest integer, "7". I wrote a macro but it did not round down but it did work. Below is the code. If someone knows of a way to rounddown without a macro, it would help alot.

    Regards,
    Greg

    Function RndDuration(rndnumber)
    Dim number As Integer

    Do While rndnumber > number + 1
    If rndnumber > number And rndnumber < number + 1 Then
    rndnumber = number
    Else: number = number + 1
    End If
    Loop

    rndnumber = number
    End Function

  2. #2
    Registered User
    Join Date
    09-26-2005
    Posts
    34
    There is a function you can use ROUNDDOWN

    =ROUNDDOWN("your cell here",0)

  3. #3
    Registered User
    Join Date
    07-11-2007
    Posts
    6

    Exclamation I tried...

    I tried Rounddwon function but I get "undefined function" message box. I use 2003 access. Any other ideas are welcomed.

    Thanks so much
    Greg

  4. #4
    Registered User
    Join Date
    07-11-2007
    Posts
    6

    Exclamation

    Quote Originally Posted by qwopzxnm
    There is a function you can use ROUNDDOWN

    =ROUNDDOWN("your cell here",0)
    I tried Rounddwon function but I get "undefined function" message box. I use 2003 access. Any other ideas are welcomed.

    Thanks so much
    Greg

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You could use:

    =FLOOR(A1,1)

    or

    =INT(A1)

    Assuming A1 is the cell you wish to round down.

    HTH

    Jason

  6. #6
    Registered User
    Join Date
    09-26-2005
    Posts
    34
    So are you using Microsoft Excel or Access?


    Quote Originally Posted by nybcnow
    I tried Rounddwon function but I get "undefined function" message box. I use 2003 access. Any other ideas are welcomed.

    Thanks so much
    Greg

  7. #7
    Registered User
    Join Date
    07-11-2007
    Posts
    6

    Thumbs up

    Quote Originally Posted by jasoncw
    You could use:

    =FLOOR(A1,1)

    or

    =INT(A1)

    Assuming A1 is the cell you wish to round down.

    HTH

    Jason
    Jason,

    Thanks so much. INT worked! Good day to you

  8. #8
    Registered User
    Join Date
    07-11-2007
    Posts
    6
    Quote Originally Posted by qwopzxnm
    So are you using Microsoft Excel or Access?
    I was in access. Sorry if I didn't make it clear. Jason suggested INT function and it worked like a charm. In any case, thanks so much for you help.

    Regards,
    Greg

+ 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