+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting with IF, AND statements to evaluate due dates

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Spokane, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Conditional formatting with IF, AND statements to evaluate due dates

    Hello, I have a rather complicated training grid I have set up to track everything for my employees and have set up conditional formatting to draw my attention to upcoming due dates/license expiration dates, anniversaries, etc. Most of this I have been able to do with just a little research. The final element that I need is the most complicated as it has to do with continuing education hours for each employee. These are tracked by year, but the year is measured from the employee's birthdate to birthdate (so for example, if my birthday is 2/16/86 then my continuing educations hours are calculated for this year from 2/16/13 - 2/16/14). To make matters worse, there is a different requirements depending on your position- Caregivers have to have 12 hrs of CEUs, non-caregiving staff have to have 6 hrs of CEUs, and RNs/LPNs are exempt because they have to have different CEUs than the rest.

    It is complicated so I have attached a sample. I currently have the grid set to flag the cells (AB for 2012 CEUs ad AC for 2013 CEUs) yellow if it is left blank, purple if the person is a caregiver and has under 12 CEUs, purple if the person is NOT a caregiver and has under 6 CEUs, and white if the person is an RN/LPN. What I actually want it to do is read the birthdate in column AD and if the person has under their required amount of CEUs AND they are due within 30 days from today then it will change the background light orange.

    An example for employee #6- This person is a Caregiver whose birthday is 8/22/1973 and they will need 12 CEUs by 8/22/13 but they currently have only 7. Because this is due next month, I want the cell to be flagged orange. One the person gets their 12 hours in, I want the cell to have no background color. So basically I want excel to do this:

    IF column C (their position) contains the word "Caregiver", AND today's date is less than 30 days from their birthday in the current year, AND the value of the cell is less than 12, THEN the cell is orange.

    I know this is confusing, but if anyone understands what I am asking and can help I would greatly appreciate it. Also, if this is impossible, please tell me and I will quit stressing about is and call my current grid good enough. Thanks!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-24-2013
    Location
    Spokane, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional formatting with IF, AND statements to evaluate due dates

    I have tried this in the conditional formatting formula bar:

    =IF(C7="Caregiver", AB7<12, DATE(YEAR(2013), MONTH(AD7), DAY(AD7))<TODAY()+30)

    and it did not work. It works up until I add in the date stuff, so I know that it is reading the part about being a caregiver and having under 12 hours fine, I am just unsure how to tell it that it also needs to be within 30 days of that person's birthday this year.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Conditional formatting with IF, AND statements to evaluate due dates

    Hi and welcome to the forum

    Not sure if this is what you want, but maybe it will get you headed in the right direction?
    =AND(C7="caregiver",DATE(2013,MONTH(B7),DAY(B7)),AC7<12)

    a quick tip for constructing complex CF formulas...
    create them IN the worksheet on the row you want it to apply to (its quicker and easier to change stuff than going into the CF window), and construct the formula to return a TRUE or FALSE answer
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    07-24-2013
    Location
    Spokane, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional formatting with IF, AND statements to evaluate due dates

    Hi FDibbins, Thanks for the help. Your solution is close, but the date is still not quite there. Your formula does flag anything that is for a caregiver, under 12 hours, and on the birthday of the current year. What I would like is for it to flag the cell if today is within 30 days of the birthday for the current year or past the birthday of the current year.

  5. #5
    Registered User
    Join Date
    07-24-2013
    Location
    Spokane, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional formatting with IF, AND statements to evaluate due dates

    Hallelujah! I think I've got it! Your formula did help me, FDibbins.

    Here is the final formula I used in case anyone else is having a similar issue:

    =AND(C7="Caregiver",AB7<12,DATE(2013,MONTH(AD7),DAY(AD7))<TODAY()+30)

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Conditional formatting with IF, AND statements to evaluate due dates

    Awesome, great job and thanks for the feedback

+ 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] IF AND statements using conditional formatting
    By jingles9 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2013, 02:53 PM
  2. [SOLVED] Can conditional formatting be used to evaluate a range of cells on a different worksheet?
    By TheITQuest in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-10-2013, 04:55 PM
  3. [SOLVED] Conditional Formatting to evaluate formula result not cell value
    By snoproladd in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2012, 11:11 PM
  4. Conditional Formatting with IF/Then Statements
    By pingwin77 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-02-2008, 10:35 AM
  5. Conditional formatting and If statements
    By redefine in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2007, 06:54 PM

Tags for this Thread

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