+ Reply to Thread
Results 1 to 5 of 5

Trying to do "If/Then" Function using the date.

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Bossier City, Lousiana
    MS-Off Ver
    Excel 2007
    Posts
    4

    Trying to do "If/Then" Function using the date.

    I have a database that checks user compliance. I already have today's date automatically appear using the "DATE" function. I have another column that tells the date that the user completed his training. What I need to happen is that my next column named "compliance" be a function. I need this column to say that if the "Date Completed Training" column is over 365 days from today's date then it says "no" (as in the user is not complaint with training. I then want it to say "yes" if it is still within 365 days of today's date. Any help would be greatly appreciated. Thank you.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Trying to do "If/Then" Function using the date.

    try

    =IF(("TodaysDate"-"DateCompletedTraining")>365,"No","Yes")

    just put in your formulas to suit
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,409

    Re: Trying to do "If/Then" Function using the date.

    You haven't provided much information, like cells, columns, and rows used, or a sample workbook, so this answer can only be hypothetical and untested.

    =IF(TrainingDate>=TODAY()-365, "yes","no")


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    10-19-2012
    Location
    Bossier City, Lousiana
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Trying to do "If/Then" Function using the date.

    That worked. Thank you very much.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,409

    Re: Trying to do "If/Then" Function using the date.

    You have two variations on a theme. Did you test both? Did both work?

    Regards, TMS


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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