+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting Logic Errors

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    5

    Conditional Formatting Logic Errors

    Hi everyone,

    So, I'm working on a project for work and I cannot get the conditional formatting correct. I've attempted this code:

    =IF(DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))>DATE(YEAR(B20),MONTH(B20),DAY(B20)),TRUE,FALSE)

    So, we have timelines and I'm trying to format each cell to highlight yellow and then red and it gets closer to the expiration date. Using Instr A as the example. Once we have an established date (DAID) we have 120 days to perform an evaluation. So, under Initial for Instr A I wanted to create a formula based a 2/13/2009 that would remain blank until I populated a date. In the meantime @ 90 days from DAID highlight yellow through 120 days. After 120 days I wanted it to turn red.

    30-day cell. We have +/- 5 duty days to complete another eval based on the initial cell.
    60-day cell. We have +/- 5 duty days to complete another eval based on the 30-day cell.
    90-day cell. We have +/- 5 duty days to complete another eval based on the 60-day cell.
    Annual cell. We have +/- 5 duty days to comple another eval based on initial (every 365).

    INSTR DAID INITIAL 30-DAY 60-DAY 90-DAY ANNUAL LAST NO-NOTICE
    A 2/13/2009
    B 5/4/2012
    C 5/10/2010
    D 6/8/2009
    E 9/5/2012
    F 8/12/2011
    G 1/4/2013
    H 11/8/2010
    I 6/12/2012
    J 11/16/2012

    I've been working this for nearly 9 hours and I'm stumped! I could really use some help with this. thank you!

    Matthew

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Conditional Formatting Logic Errors

    Matthew

    Can you upload a sample workbook?

    I don't think it will help but this formula,
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    can be written like this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Conditional Formatting Logic Errors

    Hi traftacana

    Assuming you have a date in cell A1 (01/02/2013), for something due in 30 days or less: =A1-TODAY()<=30

    Is that something that you could work with, just adjust the day's at the end ie: 60, 90 etc
    Last edited by Kevin UK; 01-04-2013 at 01:45 PM.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

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

    Re: Conditional Formatting Logic Errors

    Trying to wrap my mind around what you want.
    You have 120 days from DAID to put something under "Initial"
    If it gets to 115 days and Inital is still blank, you want the DAID date to turn red (or the Initial Cell or both?)
    Once "Initial is filled in, 30, 60, 90 and Annual automatically populate with dates based on initial?
    Is it 60 days from 30 or 60 days from initial?
    If you do your evaluation at 20 days for example, is 60 days from then ?
    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

  5. #5
    Registered User
    Join Date
    01-04-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Formatting Logic Errors

    Thank you Norie. I tried that one too and I couldn't get it work.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-04-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Formatting Logic Errors

    Chemist. I included a sample that should be easier to interpret. I added notes to the requirements.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Conditional Formatting Logic Errors

    In the worksheet why does the formula for conditional formatting on row 2 reference B20?

  8. #8
    Registered User
    Join Date
    01-04-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Formatting Logic Errors

    Kevin,

    I tried that format; however, the color will not adjust.

    =DATE(2012,5,12) Cell B3 and Condition Format Cell C3 =B3-TODAY()<=90

  9. #9
    Registered User
    Join Date
    01-04-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Formatting Logic Errors

    Norie, on the full database it's B20 but for my sample it would be something like B2

+ 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