+ Reply to Thread
Results 1 to 19 of 19

Reference current date and compare it to multiple cells

  1. #1
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Reference current date and compare it to multiple cells

    Hello,

    My experience with excel is very limited and I somehow got stuck creating a complex workbook for my company . I've done pretty well so far but I have run into an issue I cannot figure out or been able to find on the web. I'm hoping somone here can help. Here's what I'm trying to do......

    I'm tracking training for my company. We have 3 sets of training. Training that needs to be completed within 5 days, 30 days and 6 months of an employee start date. I have columns that calculate the due date based on an employee start date and the status of each, whether it's complete or not complete, but I have another column for each that I want to track if we're in compliancy.

    For example, if it's the employee's 3rd day at work and he hasn't completed all the training within 5 days, we're still in compliancy, even though the status column will say Not Complete. I need a formula that will look at the current date, compare it to the start date as well as look at the status of each training and tell me if that employee is stil in compliancy.

    I hope it's not as confusing as it sounds! Thanks in advance to anyone who can help. I really appreciate it.
    Last edited by ieatbred; 02-08-2011 at 07:08 PM. Reason: Title Change - Solved

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Complex formula?

    That sounds do-able.

    Can you give a little more detail on which data you have in each column, with examples and desired results, a small sample spreadsheet might help, you can attach it to your post
    Audere est facere

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Complex formula?

    When uploading your attachment please also be sure to modify your thread title to something more appropriate (per Forum Rules)

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Complex formula?

    DLL

    Are you getting soft on Rule #1?

  5. #5
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Complex formula?

    In my spreadsheet I have Columns A - N. Column A - E is information on the employee. Column D is the employee start date. Column F is the Due date for training that needs to be completed in 5 days, column G is the due date for training that needs to be completed in 30 days and column H is the due date for training that needs to be completed within 6 months. These are all a simple calculation based on the start date. Column's I - K is the status of each training. It's either Complete or not completed based on information from a separate tab. Then column's L - N is supposed to track if the employee is compliant on 5 Day (Column L), 30 Day, (Column M) and 6 month (Column N) training. Column's L-N should be YES or NO. These columns need to some how reference the start date, the current date and the status to determine if the employee is compliant.

  6. #6
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    uploading spreadsheet.
    Attached Files Attached Files

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Complex formula?

    Quote Originally Posted by Cutter View Post
    DLL

    Are you getting soft on Rule #1?
    I've been concentrating on Rule 14...........

  8. #8
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    Bump......

  9. #9
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    Am I on the right track with =IF(AND(TODAY()>D3,TODAY()<F3),"YES","NO")

    That looks at the start date vs the due date, but it doesn't check aganist the status of column I.

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Reference current date and compare it to multiple cells

    Firstly, why do you have different date formats?
    Col D is formatted as: yy-mm-dd
    Col F is formatted as: mm-dd-yy


    As far as your L col is concerned, try this:

    =IF($D3="","",IF(OR(AND(I3="Complete",F3-$D3<6),TODAY()-$D3<6),"Yes","No"))

    Adjust for cols M & N so that in M3 use:

    =IF($D3="","",IF(OR(AND(J3="Complete",G3-$D3<31),TODAY()-$D3<31),"Yes","No"))

    and in N3 use:

    =IF($D3="","",IF(OR(AND(K3="Complete",H3-$D3<182),TODAY()-$D3<182),"Yes","No"))

    Not sure about that 182 but since you were using 181 in col H that's what I went with.

    These formulas result in the same Yes No results you already had in cols L:M
    Last edited by Cutter; 01-31-2011 at 03:42 PM.

  11. #11
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    Thanks Cutter....I was playing with the formula this morning and came up with =IF(OR(TODAY()<F3,I3="Complete"),"YES","NO")

    Is that working the same as what you gave me?

    They both seem to be working the way I need it to, but I just want to confirm...

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Reference current date and compare it to multiple cells

    The one I gave does a check on whether or not the "Complete" complies with the limitation.

    Yours will give a "Yes" result merely because it says "Complete". So, for instance, if the 5 day training was completed 7 days after start date you will get a "Yes" with yours and a "No" with mine.

    But you should replace the TODAY()-$D3<6 in mine with your simplification: TODAY()<=F3

    Note the <= instead of just <
    Last edited by Cutter; 01-31-2011 at 04:10 PM.

  13. #13
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    Gotcha, I actually need it to say YES even it the training was completed pass the 5 day mark.

  14. #14
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Reference current date and compare it to multiple cells

    Then you shouldn't use the word "compliant" - just "done".

    And doesn't that make those columns redundant? You have 3 columns giving a "Complete" or "Incomplete" on whether or not the training was done. Now you are just saying "Yes" or "No" in the next 3 columns on whether or not the training was done>
    Last edited by Cutter; 01-31-2011 at 04:42 PM.

  15. #15
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    What if I wanted to track on how many of them missed their due date? Could I color the cells in L-N a color?

    For example, if somebody completed the 5 day training in 10 days, I still want it to say yes, but can the color of the cell turn red or a different color to show that yes, it's complete now, but it went over the due date?

  16. #16
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Reference current date and compare it to multiple cells

    You can do that with the 3 previous columns and do away with the yes/no columns.

  17. #17
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    It should also turn red if the status is not complete and say no if the training isn't completed.

  18. #18
    Registered User
    Join Date
    01-28-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Reference current date and compare it to multiple cells

    My reason for the 3 Yes/No columns is I also want to create a formula to graph out the percentage of people that are compliant and not compliant, but if I can do that based off of colors, green for being in compliance and red for being out of compliance, I'd much rather do that than have the additional 3 columns. Thanks for all of your help, I appreciate it.

  19. #19
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Reference current date and compare it to multiple cells

    I think you're missing my point.
    I'm saying that, based on this response you gave:

    I actually need it to say YES even it the training was completed pass the 5 day mark.
    you are making the yes/no columns redundant because you are NOT checking for compliance.

    Using the formulas I gave you DO check for compliance so those columns would not be redundant if those formulas were used. If you are now saying that you DO want to check for compliance then you should use the Yes/No columns but only if you use the formulas I gave you.

+ 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