+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting - job completion status by colour

  1. #1
    Registered User
    Join Date
    11-27-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Conditional formatting - job completion status by colour

    I've had problems formatting in Excel. Can anyone suggest a suitable video? Or better, even outline steps to do the following:

    I'm trying to flag employee task completion status by automatically showing background fill:
    LESS THAN 5 days is GREEN.
    MORE THAN OR EQUAL TO 5 days, but LESS THAN 10, turns YELLOW.
    MORE THAN OR EQUAL TO 10 days, turns RED.

    I don't need to differentiate types of day (weekends,etc), but I do need to show dates, not just codes. And I need a historical record for several months before clearing and starting fresh.

    Eg, assuming today is 27 Nov 2011:
    EmpA is GREEN because she completed in LESS THAN 5 days.
    EmpB is RED because she completed IN MORE THAN OR EQUAL TO 10 days.
    EmpA (second task) is GREEN because she still has a few days left.

    A B C D
    1 Employee Task Assigned Completed
    2 EmpA 11e02 22 May 2011 25 May 2011
    3 EmpB 11e82 26 May 2011 15 Jun 2011
    4 EmpA 11e03 25 Nov 2011 pending

    Any help would be much appreciated.
    Last edited by newE; 11-27-2011 at 02:36 PM. Reason: Improve thread title

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Conditional formatting - job completion status by colour

    =OR(D2="pending",D2<C2+5) for green
    =D2>=C2+10 for red
    and then you can have the default format yellow.
    Life is about perseverance. Remember: today's mighty oak tree is just yesterday's nut that held its ground.

    If you like a post, please rate it with the scales icon (top right).
    If you feel really indebted, please consider a donation to charity, such as Feed the Children or Habitat for Humanity.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting - job completion status by colour

    try these in order using the "use a formula option"
    =OR($B1="",D1="") NO COLOUR
    =IF(AND(ISNUMBER($C1),ISNUMBER($D1)),$D1-$C1,TODAY()-$C1)>=10 RED
    =IF(AND(ISNUMBER($C1),ISNUMBER($D1)),$D1-$C1,TODAY()-$C1)>=5 YELLOW
    =IF(AND(ISNUMBER($C1),ISNUMBER($D1)),$D1-$C1,TODAY()-$C1)>=0 GREEN
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Conditional formatting - job completion status by colour

    Out of curiosity, why would you need the top one? You can always have a default of no color if none of the others are met. A second issue is that your formulas would not return green if the date assigned and date completed are the same because D1-C1 would equal 0. Lastly, the OP would have to be sure to check the box of Stop if True for each of these formulas after the first. (Alternatively, the formulas could be used in reverse order without those boxes checked.)

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting - job completion status by colour

    today()-blank or 0 will be >10 so default would be red
    condition is d1-c1>=0 so it would
    and i forgot the stop if tru bit coz im doing this in '97 and it does them in order(and i could only do 3 at a time)
    Last edited by martindwilson; 11-27-2011 at 04:29 PM.

+ 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