+ Reply to Thread
Results 1 to 5 of 5

Rounding decimals below and above 0,50

  1. #1
    Forum Contributor
    Join Date
    03-16-2007
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2007
    Posts
    202

    Rounding decimals below and above 0,50

    Which formula in B1 returns the number from A1, with two decimals, rounded in the following way:

    If the decimals are anywhere between ,01 and ,49 ----> ,50
    If the decimals are anywhere between ,51 and ,99 ----> ,00 (+1)

    For example:

    3,34 ---> 3,50
    2,79 ---> 3,00
    12,02 ---> 12,50

    Thanks!

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Rounding decimals below and above 0,50

    If none of the Round functions suit your needs.

    Try this
    =IF(OR(MOD(A1,1)=0,MOD(A1,1)=0.5),A1,IF(MOD(A1,1)<0.5,INT(A1)+0.5,INT(A1)+1))

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Contributor
    Join Date
    03-16-2007
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2007
    Posts
    202

    Re: Rounding decimals below and above 0,50

    that's it!!!
    thanks

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Rounding decimals below and above 0,50

    =ceiling(a1,0.5)
    Remember what the dormouse said
    Feed your head

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Rounding decimals below and above 0,50

    Guess I'm getting to old to learn/remember all these formula things!

    Cheers romperstomper

+ 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