+ Reply to Thread
Results 1 to 2 of 2

Look up and calculate the difference between two dates associated with an ID value

  1. #1
    Registered User
    Join Date
    05-17-2018
    Location
    England
    MS-Off Ver
    Excel 2017
    Posts
    1

    Exclamation Look up and calculate the difference between two dates associated with an ID value

    I have two columns of data, one a list of dates and the second a list of IDs. I want to calculate the difference between the date in the current row and the next largest date associated with the same ID. I am guessing that I will need to use DATEDIF, INDEX and MATCH but I am not sure how to put it all together. I guess that the final formula would resemble {=DATED IF(currentdate,(formula to find next date),"d")}.

    I have tried using {INDEX(daterange,MATCH(ID,IDrange,0))} but this gives me the first date associated with the ID rather than the next largest date.

    How do you find the next largest date associated with the ID value for the current date?
    Any advice would be greatly appreciated, thank you.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,198

    Re: Look up and calculate the difference between two dates associated with an ID value

    Attach a sample workbook (not image).so that we do not have to manually key in your data to do a testing.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

+ 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. How to calculate the difference between two dates
    By gregory4uk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2014, 03:53 PM
  2. Calculate difference in dates
    By papaexcel in forum Excel General
    Replies: 9
    Last Post: 07-27-2009, 02:43 PM
  3. Calculate difference between dates
    By paula vasile in forum Excel General
    Replies: 1
    Last Post: 09-23-2008, 06:42 AM
  4. Calculate difference between dates
    By mprice1988 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-25-2008, 01:32 PM
  5. [SOLVED] How do I calculate the difference between 2 dates (m,d,y) ?
    By ady_sandu in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-29-2005, 01:05 PM
  6. Calculate Difference b/e 2 dates.
    By scharee in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-02-2005, 12:05 PM
  7. [SOLVED] Calculate difference between two dates
    By Trainer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-11-2005, 11:06 AM

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