+ Reply to Thread
Results 1 to 9 of 9

Date Help

  1. #1
    Registered User
    Join Date
    06-07-2009
    Location
    Tennessee
    MS-Off Ver
    Excel 2003
    Posts
    8

    Exclamation Date Help

    I am working on a Excel Program to keep track of Personnel Training. I am trying to get a Condition set so if I enter a date, such as Drivers License Expiration Date, into F8 F9 F10 and so on for each Employee it will Change to Yellow when it is with-in 3 months of Expiring or turn Red when it has passed. I have tried a lot of tips online and every time it randomly changes colors when nothing is in the cell or a passed date does not change at all. How can I fix this?
    Attached Files Attached Files
    Last edited by Acems033; 12-03-2009 at 12:14 PM.

  2. #2
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Date Help

    Please try the attached version.


    I am assuming, that whenever you enter anything in f 8 and so on, you want to compare the entered date along with the current date. It can be easily compared with the conditional formatting.

    logic:

    Conditional formatting in F8 :

    Condition1 : =AND(NOW()>F8,F8<>"")
    Condition2 : =AND((MONTH(F8)-MONTH(NOW()))<3,F8<>"")

    Copy the cell and paste the formatting in the cells below. I have also achieved this in the attached excel.

    Thanks,
    Vikas
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-07-2009
    Location
    Tennessee
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Date Help

    THANKS! That works perfectly!

    Now when I highlight all the cells it pertains to and enter the formula it refers back to F8. How can I get it to refer only to the cell it needs to (such as G8 H8) and so on? Do I have to format each cell individually or do is their a shortcut? I know their probably is but my minds eye needs glasses today for some reason and I cant remember how.

    Thanks a lot. You made my job 100% EASIER!

  4. #4
    Registered User
    Join Date
    06-07-2009
    Location
    Tennessee
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Date Help

    Never Mind. I got it. THANKS a bunch. I really appreciate it.

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

    Re: Date Help

    Vikas

    Condition2 : =AND((MONTH(F8)-MONTH(NOW()))<3,F8<>"")
    I think you would want to adapt that to a DATEDIF function... using the above every single date would meet the above criteria in Dec for ex.

  6. #6
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Date Help

    Quote Originally Posted by DonkeyOte View Post
    Vikas



    I think you would want to adapt that to a DATEDIF function... using the above every single date would meet the above criteria in Dec for ex.
    Ahh....pretty long I have worked on Excel. Now coming back slowly slowly :D

    Thanks for that!!!
    Vikas Bhandari

  7. #7
    Registered User
    Join Date
    06-07-2009
    Location
    Tennessee
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Date Help

    Ok, It works for day and month but if I enter a date of 12/31/2012 for example it still says its with-in the 3 month date. It only looks at the day and month. How do I format it to look at year also?

  8. #8
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Date Help

    Oh, Sorry about that :

    Please change it to following Conditions:

    =AND(ISERROR(DATEDIF(NOW(),F8,"d")),F8<>"")
    =AND(NOT(ISERROR(DATEDIF(NOW(),F8,"d"))),F8<>"",(DATEDIF(NOW(),F8,"m")<4))
    HTH,
    Vikas
    Last edited by vikas.bhandari; 12-04-2009 at 05:34 AM.

  9. #9
    Registered User
    Join Date
    06-07-2009
    Location
    Tennessee
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Date Help

    Ok, now I need to change the formula

    =AND(ISERROR(DATEDIF(NOW(),F8,"d")),F8<>"")
    =AND(NOT(ISERROR(DATEDIF(NOW(),F8,"d"))),F8<>"",(DATEDIF(NOW(),F8,"m")<4))

    to only look at the month and year. As in 07/2013 and so on. We changed our files to only have the Month and Year something expires since 99% of our training expires on the last day of a certain month.

+ 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