+ Reply to Thread
Results 1 to 8 of 8

Round up & down in single formula

  1. #1
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,279

    Round up & down in single formula

    I am using Excel 2007.
    Suppose in cell B1 value is 1685.49 then result show as 1685.00 (Rounddown) but if in cell value is 1685.51 then result show as 1686.00
    How to using both (=Rounddown & Roundup) formula in single cell.

  2. #2
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Round up & down in single formula

    Hi Avk,

    Simple follow the following steps.

    you can simply do it without formula by following steps. Select your range which you wanted to convert into without decimal, then do right click or press CTRL+1 , and FORMAT CELLS window will appear. Refer the inline image



    Format Cell 3.png

    Or you Can do it by going into Home tab --> Number (See below image) --> Click 2 times on Decrease Decimal

    Format Cell 2.png

    The above customize formatting will automatically roundup your number if numbers are greater than 50 after decimal and in same ways it rounddown if numbers are less than 50 after decimal.

    I hope this is what you were looking for.
    Last edited by adhawan06; 04-10-2015 at 05:14 AM.
    Thanks,
    Anil Dhawan


    Click *Add Reputation to say "Thanks" and don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved) if you are satisfied.

    Don't stop when you are tired. STOP when you are done!

  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,279

    Re: Round up & down in single formula

    Yes i know that, but it is possible two join both formula in single cell.

  4. #4
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Round up & down in single formula

    Hi Avk,

    You can use Round function. Lets say You have value 1685.49 in A1 then formula will be =round(A1) and it will return it to 1685 and if you have 1686.51 then it will return it to 1686.

    Hope this make works for you.

  5. #5
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Round up & down in single formula

    Quote Originally Posted by avk View Post
    Suppose in cell B1 value is 1685.49 then result show as 1685.00 (Rounddown) but if in cell value is 1685.51 then result show as 1686.00
    It sounds like you simply want the ROUND function, to wit: =ROUND(B1,0).

    But what if the value is 1684.5 and 1685.5. ROUND will return 1685 and 1686 respectively. But some people what 1684 and 1686 -- so-called banker's rounding.

    For banker's rounding, you might write: =ROUND(B1,0)-(MOD(B1,1)=0.5).

    [ERRATA] The formula should be:
    =ROUND(B1,0) - IF(ISEVEN(INT(B1)),MOD(B1,1)=0.5)

    [EDIT] Unfortunately, there is a defect (IMHO) in Excel ROUND. For example, if B1 is =1685.5-"4E-12", that should round down to 1685 because 1685.5-"4E-12" is less than 1685.5. But instead, it rounds to 1686 because MOD(B1,1)<>0.5, but ROUND(B1,0) incorrectly rounds to 1686. That might seem okay to you because Excel displays 1685.50000000000 if B1 is formatted to 11 decimal places, the most that Excel formats, an arbitrary limit. But you can use =B1-1685.5<0 to confirm that 1685.5-"4E-12" is less than 1685.5.

    FYI, =B1<1685.5 returns FALSE incorrectly because of a dubious heuristic in Excel that treats different values as equal if they are "close enough".
    Last edited by joeu2004; 04-10-2015 at 10:54 AM. Reason: [EDIT]; [ERRATA]

  6. #6
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Round up & down in single formula

    Quote Originally Posted by joeu2004 View Post
    It sounds like you simply want the ROUND function, to wit: =ROUND(B1,0).

    But what if the value is 1684.5 and 1685.5. ROUND will return 1685 and 1686 respectively. But some people what 1684 and 1686 -- so-called banker's rounding.

    Ostensibly, you might write: =ROUND(B1,0)-(MOD(B1,1)=0.5).
    Yup you are right, But I think he is not looking for to have Round to return 1685 for value 1685.50 as he must be looking for 1686 for 1685.5 (As in accounting it always vary if you even have 1 after decimals)


    Waiting for AVK's answer

  7. #7
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Round up & down in single formula

    [.... deleted ....]
    Last edited by joeu2004; 04-10-2015 at 10:49 AM.

  8. #8
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Round up & down in single formula

    Quote Originally Posted by joeu2004 View Post
    But what if the value is 1684.5 and 1685.5. ROUND will return 1685 and 1686 respectively. But some people what 1684 and 1686 -- so-called banker's rounding.

    For banker's rounding, you might write: =ROUND(B1,0)-(MOD(B1,1)=0.5).
    Quote Originally Posted by adhawan06 View Post
    I think he is not looking for to have Round to return 1685 for value 1685.50 as he must be looking for 1686 for 1685.5
    We don't disagree; I said as much previously. But I see the point you failed to state: my banker's rounding formula is incorrect. It should be:

    =ROUND(B1,0) - IF(ISEVEN(INT(B1)),MOD(B1,1)=0.5)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 12-06-2014, 01:58 PM
  2. round up round down formula
    By m_789 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-04-2014, 05:34 AM
  3. [SOLVED] Round Single Variable To 2 Decimal Places
    By nevi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2012, 02:33 PM
  4. Formula - single formula to give me age for both in a single cell
    By matheanil in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-08-2008, 09:17 AM
  5. [SOLVED] Format divide by 10 / single digit view: Custom? Text(Round(
    By nastech in forum Excel General
    Replies: 0
    Last Post: 06-27-2006, 06:10 PM

Tags for this Thread

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