+ Reply to Thread
Results 1 to 4 of 4

Formula to compare date (including month and year) from a listed date to today's date

  1. #1
    Registered User
    Join Date
    08-22-2014
    Location
    Kelowna, Canada
    MS-Off Ver
    Office 2010
    Posts
    30

    Formula to compare date (including month and year) from a listed date to today's date

    Cells D3:D100 contain a list of dates (MM/DD/YYYY). Cell E1 contains the formula =TODAY() to return today's date.

    The formula I want to create would compare the months of the listed dates with the month of cell E1. If the month/Year in cell D3 matches E1, Cell E3 would Type the word "Due." If the month/year was older than the month/year of todays date, it would type "Overdue."

    The formula I have almost works:
    =IF(D3<EDATE($E$1,-1),"OVERDUE",IF(D3<EDATE($E$1,0),"DUE",""))

    The only issue is that it looks at the date, and if the date is expired by one month, it writes "Due". If the listed date in D3 is Nov 25, 2014, for example, it does not write "Due." Instead of the date and going back one month, I want the formula to look at the month and year of the date in D3 and if it is the same month/year as E1 (TODAY) then it will list "Due." If month/year of D3 is older than the current month/year, it would say "Overdue."

    Thanks in advance.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to compare date (including month and year) from a listed date to today's date

    Try

    =IF(D3<$E$1-DAY($E$1)+1,"Overdue",IF(TEXT(D3,"mmyy")=TEXT($E$1,"mmyy"),"Due",""))

  3. #3
    Registered User
    Join Date
    08-22-2014
    Location
    Kelowna, Canada
    MS-Off Ver
    Office 2010
    Posts
    30

    Re: Formula to compare date (including month and year) from a listed date to today's date

    Ended up figuring it out. Below is what I used.

    =IF(DATE(YEAR($E$1),MONTH($E$1),1)-DATE(YEAR(D3),MONTH(D3),1)=0,"Due",IF(DATE(YEAR($E$1),MONTH($E$1),1)-DATE(YEAR(D3),MONTH(D3),1)>0,"Overdue",""))

  4. #4
    Registered User
    Join Date
    08-22-2014
    Location
    Kelowna, Canada
    MS-Off Ver
    Office 2010
    Posts
    30

    Re: Formula to compare date (including month and year) from a listed date to today's date

    Thank you though.

+ 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] Using SumProduct for dates inclusive of Year to Date, Month to date, Quarter to Date
    By cartica in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2014, 04:22 PM
  2. calculating month to date, year to date, week to date
    By labogola in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2014, 05:21 AM
  3. [SOLVED] Formula for today's date as year month day
    By Jahzeal in forum Office 365
    Replies: 3
    Last Post: 10-21-2013, 06:50 AM
  4. [SOLVED] Compare with Date TODAY function, and have resulted in year to DateDiff Via VBA
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2012, 01:18 PM
  5. [SOLVED] Excel 2007 : Convert Today's Date To The Previous Month & Year
    By The_Snook in forum Excel General
    Replies: 8
    Last Post: 04-26-2012, 06:37 AM

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