+ Reply to Thread
Results 1 to 5 of 5

Round odd numbers for conditional formatting

  1. #1
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    161

    Round odd numbers for conditional formatting

    I have a sheet that has conditional formatting that looks at column D2
    for a number and divides that by half. it then colors in a corresponding cell on a row in the sheet that matches that number. the problem i am having is with odd numbers like 23 it gives a result of 11.5 . all my cell numbers are all rounded to whole numbers. i need to round the 11.5 to 12 or 13 it does not matter which one... i just need it to round it up or down. I have tried everything i can think of but have had no luck. I attached my workbook so you can see how it works.
    Attached Files Attached Files
    Last edited by Traymond; 05-05-2009 at 12:46 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Round odd numbers for conditional formatting

    How can one round 11.5 to 13?!
    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Round odd numbers for conditional formatting

    Use CEILING or FLOOR to push the number in the direction you want. Either:

    =CEILING($D$2/2,1) (rounds up)
    or
    =FLOOR($D$2/2,1) (rounds down)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Round odd numbers for conditional formatting

    Ceiling and Floor is just what i was looking for... thanks for the help

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Round odd numbers for conditional formatting

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED].



    (Also, click on the "scales" icon across from the date on my post to leave Feedback, it is appreciated)

+ 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