+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting based on text in one cell, date in another

  1. #1
    Registered User
    Join Date
    04-29-2013
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    9

    Conditional formatting based on text in one cell, date in another

    Hi guys,

    I'm working on a spreadsheet and would like to add some conditional formatting.

    Our spreadsheet keeps track of things coming through the shop. Occasionally, there are administrative hold-ups that can get quite lengthy. I need a fast was of having these delays stand out to create greater viability to management.

    Here's a brief breakdown -

    The 'A' column is the date it is received into the shop.
    The 'I' column is a field that is for 'sickbay' (meaning, if there is some sort of paperwork issue preventing the unit from going to the shop.). There is a drop-down list for "Yes" or "No".
    The 'L' column is a place to enter notes.

    What I'd like to do is add conditional formatting to the 'L' column based on the other two columns.

    I think I need the formula to check the 'I' column for "Yes" or "No". If it is "Yes", then check the 'A' column. If the date is the 'A' column is older than two weeks, turn the 'L' column orange; if it's older than 30 days, turn it red.

    Once something comes out of "sickbay" (the receiving clerk will change the answer "Yes" to "No" in the 'I' column), I want the formatting to back to normal.

    Clear as mud, right?

    Thanks in advance! I'd appreciate any help you guys could give.
    Last edited by Chuck_N; 04-29-2013 at 11:35 AM.

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Conditional formatting based on text in one cell, date in another

    The following formula should work, assuming you want your conditional formatting to start applying in row 2. Change the row number in the formulas to match your data set.
    NOTE: Make sure the 14 day formula is a higher priority than the 30 day formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please click the * icon below if I have helped.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Conditional formatting based on text in one cell, date in another

    Select L2:L? and go to conditional formatting > New Rule> Use Formula

    =AND(I2="Yes", ISNUMBER(A2), A2+14<= TODAY()) Format as Orange

    AND(I2="Yes", ISNUMBER(A2), A2+30<= TODAY()) Format as Red
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    04-29-2013
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Conditional formatting based on text in one cell, date in another

    Quote Originally Posted by Melvinrobb View Post
    The following formula should work, assuming you want your conditional formatting to start applying in row 2. Change the row number in the formulas to match your data set.
    NOTE: Make sure the 14 day formula is a higher priority than the 30 day formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This one didn't seem to do exactly what I was looking for as it didn't seem to take into consideration the date columns if it were blank. Something weird happened with the formatting as you copy down the list.

    Quote Originally Posted by ChemistB View Post
    Select L2:L? and go to conditional formatting > New Rule> Use Formula

    =AND(I2="Yes", ISNUMBER(A2), A2+14<= TODAY()) Format as Orange

    AND(I2="Yes", ISNUMBER(A2), A2+30<= TODAY()) Format as Red
    Does that work for you?
    This worked perfectly! Thank you so much!

+ 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