+ Reply to Thread
Results 1 to 5 of 5

Using a look-up formula to find the first date among a variaty of dates associated with ID

  1. #1
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Using a look-up formula to find the first date among a variaty of dates associated with ID

    Hallo everyone.

    Let me try to explain my problem:

    In an ERP-system I have a lot of ID's under which there is a lot of different payments. So fx ID=100000100 can contain 10 payments each with a different reciept date:

    ID Amount Recipt date
    100000100 €100 20130101
    100000100 €-100 20130607
    100000100 € 500 20141121
    100000100 and so on.......................................
    100000100
    100000100

    I need a formula that can lookup the very first reciept date for each ID (not the second, third og fouth date, but the very first reciept date).
    I already know which ID's I wanna look up - I have that information in a speadsheet.

    I hope you can be of help!

    Kind regards

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,274

    Re: Using a look-up formula to find the first date among a variaty of dates associated wit

    I have assumed by first date, your mean the earliest date, not the date that is the highest up in your list of data.

    If your dates are in the form of a number - YYYYMMDD - or are actual dates formatted in any way you want, and your data is as shown in Columns A:C, then with the first ID of interest in Cell E2, you can use an array formula like this, entered using Ctrl-Shift-Enter)

    =MIN(IF($A$2:$A$1000=E2,IF($C$2:$C$1000>0,$C$2:$C$1000)))


    You could also use a pivot table to find all the earliest dates....
    Last edited by Bernie Deitrick; 10-09-2019 at 02:46 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Using a look-up formula to find the first date among a variaty of dates associated wit

    Hallo Bernie

    Thanks for the answer

    I Think I need just a litte more help.

    In one spreadsheet (spreadsheet1) I have the following informations, which are the informations I wanna lookup:

    ColumnA=ID ColumnB=amount ColumnC=reciptdate
    100085645914 6,53 20180920
    100067194259 30746,3 20170506
    100081397757 73,75 20180423

    I wanna check, wheather or not the recipt date in spreadsheet1 for each ID corrospond with the earliest date for each ID in the ERP-system (spreadsheet2), where the same ID are represented many times:

    ColumnA=ID ColumnB=Recipt ColumnC=amount
    100067194259 20170405 30.746,30
    100067194259 20170506 -30.746,30
    100067194259 20170506 30.746,30
    100085645914 20180920 -6,53
    100085645914 20180920 6,53
    100085645914 20180724 6,53
    100081397757 20180423 73,75


    Can you talk me through the formula (I am here to learn), on how you would make a formula that could check weather or not the recipt in speadsheet1 actually is the earliest date for each ID.

    Kind regards, and thanks for your patients!

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,274

    Re: Using a look-up formula to find the first date among a variaty of dates associated wit

    I took you use of the term 'spreadsheet' to mean a sheet within a workbook - so, with two sheets in the same workbook, here is an example array formula, entered using Ctrl-Shift-Enter: Since you are using commas and decimals, you may also need to change the commas in my formulas to semicolons. I hope that Excel handles it automatically when you open the attachment.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Using a look-up formula to find the first date among a variaty of dates associated wit

    Yeah, sorry about that. Communication can be a *****.

    But thanks! It makes perfect sense. And nice use of the MIN-formula by the way.

    Great learning!

+ 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. Find the nearest date in a range of dates formula
    By kaytoc in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 10
    Last Post: 10-20-2017, 04:51 PM
  2. Find the nearest date in a range of dates formula
    By kaytoc in forum Excel General
    Replies: 9
    Last Post: 10-20-2017, 03:24 PM
  3. Replies: 3
    Last Post: 05-17-2017, 12:28 PM
  4. Replies: 1
    Last Post: 01-01-2016, 04:33 PM
  5. [SOLVED] Need formula to find out if date is within 2 columns of dates
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-21-2015, 08:57 PM
  6. Replies: 1
    Last Post: 11-25-2014, 07:26 PM
  7. Replies: 4
    Last Post: 08-23-2011, 07:42 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