+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting for date based on cell that has formula

  1. #1
    Registered User
    Join Date
    10-22-2013
    Location
    Victoria, TX
    MS-Off Ver
    Excel 2010
    Posts
    28

    Conditional formatting for date based on cell that has formula

    I have a workbook that has a summary page that pulls information from other worksheets. I would like to apply conditional formatting to a due date cell based on whether there is a date in the cell next to it. I saw the thread earlier that talked about this exact thing (this was the formula used =AND(X1<TODAY()-30,Y1=""). The problem I'm having is that because the information pulls from another worksheet and is based on a formula I can't just use a blank as the criteria. When there is a blank in the cell where the information is pulled from it returns a "0". I used conditional formatting to turn any cells that have blanks/"0"'s red so that I know I still need information for that cell. I tried to replace the blank in the cell from earlier with a 0, but that didn't work either. Attached is the spreadsheet I'm using. This is specifically what I need:

    For column H: If the POC Due date is within 8 days from today I need to have dark green text and highlight green. If the POC due date is within 2 days before or any time after the date in that column I need it to highlight yellow with red text. If there is a date in column I then I need column G to have no special formatting.

    I have attached the spreadsheet to show you what I am working with.

    PS: Big thanks to Pete_UK for helping with the original workbook!

    2015 Regulatory Status sample.xls

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional formatting for date based on cell that has formula

    Select your column H range, then click CF, 'New Rule' then 'Use a formula to determine...'. Enter this formula:
    =AND(K2<=TODAY()+8,K2>TODAY()+2)
    then select dark green text and green fill using the 'Format' button.

    Repeat the above with this formula:
    =AND(K2<=TODAY()+2,K2<>"",K2<>0)
    then select red text and yellow fill.

    For Column G, checking if column I contains a date isn't too easy, as a date in Excel is just a number formatted to display as a date (42314 might display as 6th Nov 2015, but it's still just the number 42314 to Excel). If you won't have any other types of numbers in column I, then try using this CF rule for column G:
    =AND(ISNUMBER(I2),I2>0)
    Click 'Format' then click 'No Color' on the 'Fill' tab to override other formatting.

    Hope that does what you want. Here's your file with those in place (plus a date in I3, to test the column G formatting): 2015 Regulatory Status sample - with CF cols H and G _ AS.xlsx
    (It's in 2010 format now - I don't have 2003 handy to check how it works if opened using that.)
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    10-22-2013
    Location
    Victoria, TX
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Conditional formatting for date based on cell that has formula

    Thank you so much! You are a genius!

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional formatting for date based on cell that has formula

    You're welcome and thanks for the rep.

+ 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. [SOLVED] Conditional Formatting Multiple Cells Based On Date In Other Cell
    By Gtrtim112 in forum Excel General
    Replies: 3
    Last Post: 01-03-2015, 06:18 PM
  2. Replies: 3
    Last Post: 11-23-2013, 06:21 AM
  3. [SOLVED] Conditional formatting based on text in one cell, date in another
    By Chuck_N in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-29-2013, 11:34 AM
  4. How to mark cells based on date in other cell using conditional formatting
    By mharsvik in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-01-2012, 12:33 PM
  5. Replies: 10
    Last Post: 02-01-2012, 09:48 AM
  6. Replies: 5
    Last Post: 04-22-2011, 02:50 PM
  7. Conditional formatting based on text in cell and a corresponding date
    By livinglegend629 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2010, 05:10 PM

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