+ Reply to Thread
Results 1 to 8 of 8

Formula for date comparison

Hybrid View

Grasshopper Green Formula for date comparison 05-10-2018, 09:54 AM
63falcondude Re: Formula for date... 05-10-2018, 10:02 AM
Grasshopper Green Re: Formula for date... 05-10-2018, 10:30 AM
63falcondude Re: Formula for date... 05-10-2018, 10:42 AM
Grasshopper Green Re: Formula for date... 05-10-2018, 10:54 AM
63falcondude Re: Formula for date... 05-10-2018, 10:59 AM
Grasshopper Green Re: Formula for date... 05-10-2018, 11:02 AM
63falcondude Re: Formula for date... 05-10-2018, 11:04 AM
  1. #1
    Registered User
    Join Date
    11-22-2010
    Location
    Salt Lake City, UT
    MS-Off Ver
    Professional Plus 2013
    Posts
    54

    Formula for date comparison

    I need to compare dates in two cells to show progress on a project. For example, if the in progress date of the project is within 3 months of projection, it's on time. If it's 4-5 months, it's in progress, and 6+ months is delayed. So I need three if comparisons within the formula that will spit out "on time", "in progress", or "delayed" depending on the date comparisons (today's date compared to projected complete date). I've set up nested ifs with numerical values before but not dates. Any advice?

    Thanks!

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula for date comparison

    With the "In Progress Date" in A2 and the "Projected Date" in B2, try something like this:

    =LOOKUP(DATEDIF(A2,B2,"m"),{0,4,6},{"On Time","In Progress","Delayed"})

  3. #3
    Registered User
    Join Date
    11-22-2010
    Location
    Salt Lake City, UT
    MS-Off Ver
    Professional Plus 2013
    Posts
    54

    Re: Formula for date comparison

    Let me upload a sample of what I'm working on. What I'm trying to do is take the date in column D and compare it to the date in column C, and if there is a 0-3 month difference, it's on time. If it's 4-5 months,
    in progress, and 6+, delayed. There is a formula in column D that calculates the 6 month projection. Is this possible?
    Attached Files Attached Files

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula for date comparison

    Did you try to adjust the ranges in the formula from post #2 to match your layout (A2 to C2 and B2 to D2)?

    That is:

    =LOOKUP(DATEDIF(C2,D2,"m"),{0,4,6},{"On Time","In Progress","Delayed"})

  5. #5
    Registered User
    Join Date
    11-22-2010
    Location
    Salt Lake City, UT
    MS-Off Ver
    Professional Plus 2013
    Posts
    54

    Re: Formula for date comparison

    I did, it said too many arguments?

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula for date comparison

    When I copy the formula from post #4 and paste it into F2 of the sample sheet that you shared in post #3, it works fine for me.

  7. #7
    Registered User
    Join Date
    11-22-2010
    Location
    Salt Lake City, UT
    MS-Off Ver
    Professional Plus 2013
    Posts
    54

    Re: Formula for date comparison

    I don't know what I did the first time, but it works for me once I copied it. Thanks!!

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula for date comparison

    You're welcome, thanks for the rep!

+ 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] Highest Test Score & Date range comparison formula problem
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2018, 09:56 PM
  2. [SOLVED] Target Date to Completed Date Comparison Percentage output
    By FNG_to_Excel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2015, 12:32 PM
  3. Replies: 1
    Last Post: 02-10-2014, 02:12 PM
  4. Need help with a date comparison formula - Return text based on result
    By kcleere in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2013, 03:58 PM
  5. Conditional Formula based on date comparison
    By pukks in forum Excel General
    Replies: 2
    Last Post: 03-11-2013, 09:12 AM
  6. Replies: 2
    Last Post: 10-07-2006, 09:23 AM
  7. Date comparison
    By Darkdrew in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-23-2006, 12:25 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