+ Reply to Thread
Results 1 to 7 of 7

Thread: rounding

  1. #1
    Forum Contributor
    Join Date
    03-19-2009
    Location
    Nambucca Heads NSW
    MS-Off Ver
    Excel 2007
    Posts
    107

    rounding

    i need help doing rounding
    in A2 i have 4.4 i need it to be rounded to the nearest 0.5
    in A4 i have 4.3 i need it to be rounded down to 4
    in A7 i could have 4.8 which needs to go to 5
    all the cells in column A will vary fron months to months
    i have tried mround
    roundup and rounddown doesn't work

  2. #2
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: rounding

    are you looking for one formula to do these three different roundings?
    What should happen with 4.6? Round down to 4.5?

    if so, try this:

    =IF(AND(MOD(A2,1)>=0.4,MOD(A2,1)<=0.6),MROUND(A2,0.5),ROUND(A2,0))
    Last edited by teylyn; 01-17-2010 at 04:02 PM.

  3. #3
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: rounding

    duckie
    Round with 0.5 was no good
    =ROUND(A1,0.5)
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

  4. #4
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: rounding

    or
    you'd think donkeyote thought of this one
    =IF(EXACT(MOD(G21,1),0.5),G21,ROUND(G21,0.5))
    Last edited by pike; 01-17-2010 at 04:36 PM.
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

  5. #5
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: rounding

    pike, ROUND(a2,0.5) does not round to 4.5 on my machine. What are you getting?

  6. #6
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: rounding

    Round expects an integer value for the second argument. If you use a non-integer value as that argument then I believe Excel just truncates it so if you use

    =ROUND(A1,0.5)

    or

    =ROUND(A1,0.99)

    you'll get the same results as

    =ROUND(A1,0)

    i.e. it'll round to the nearest integer

  7. #7
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: rounding

    didn't know that just trial and error
    =IF(MOD(G21,1)=0.5),G21,ROUND(G21,0))
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

+ 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.2.0