+ Reply to Thread
Results 1 to 4 of 4

Lookup formula that matches name and selects the closest date that is greater than lookup

  1. #1
    Registered User
    Join Date
    08-22-2017
    Location
    kansas
    MS-Off Ver
    365
    Posts
    2

    Lookup formula that matches name and selects the closest date that is greater than lookup

    The example is a simpler version of the spreadsheet I am working on and contains confidential information. The best way to think about this spreadsheet is to think of two library books and tracking their in and out time. I have a report that pulls the check out time and a report that pulls the check in time. Both are dropped into excel on appropriate tabs. I need to have both dates on one sheet.

    First sheet has 4 columns with the last one being the date from the second sheet
    Name Number Date Out Date Returned
    ABC 123 1/1/2017 Need Formula
    DEF 456 2/2/2017 Need Formula
    ABC 123 3/3/2017 Need Formula
    DEF 456 3/5/2017 Need Formula
    ABC 123 4/4/2017 Need Formula
    DEF 456 5/5/2017 Need Formula
    ABC 123 5/8/2017 Need Formula

    This is the three column Date returned sheet

    Name Number Date Returned
    ABC 123 2/5/2017
    DEF 456 3/2/2017
    ABC 123 4/3/2017
    DEF 456 4/5/2017
    ABC 123 4/21/2017


    This is the expected results on the first sheet
    Name Number Date Out Date Returned
    ABC 123 1/1/2017 2/5/2017
    DEF 456 2/2/2017 3/2/2017
    ABC 123 3/3/2017 4/3/2017
    DEF 456 3/5/2017 4/5/2017
    ABC 123 4/4/2017 4/21/2017
    DEF 456 5/5/2017
    ABC 123 5/8/2017
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,733

    Re: Lookup formula that matches name and selects the closest date that is greater than loo

    mntroth welcome to the forum.

    Try array entering this formula in E3 of 'Date in' and filling down.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    B
    C
    D
    E
    2
    Name
    Number
    Date Out
    Date Returned
    3
    ABC
    123
    1/1/2017
    2/5/2017
    4
    DEF
    456
    2/2/2017
    3/2/2017
    5
    ABC
    123
    3/3/2017
    4/3/2017
    6
    DEF
    456
    3/5/2017
    4/5/2017
    7
    ABC
    123
    4/4/2017
    4/21/2017
    8
    DEF
    456
    5/5/2017
    9
    ABC
    123
    5/8/2017
    Dave

  3. #3
    Registered User
    Join Date
    08-22-2017
    Location
    kansas
    MS-Off Ver
    365
    Posts
    2

    Re: Lookup formula that matches name and selects the closest date that is greater than loo

    Thanks this worked as you described but I am now being asked to go to the detail of time of return and check out. I could not get the formula to work with the time for each date. Any suggestions

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,733

    Re: Lookup formula that matches name and selects the closest date that is greater than loo

    I thought that might be the case. The one-to-one relationships were implied in the upload. So it self resolved.

    Without some way to relate the two I see no way to resolve what you now describe.

    Perhaps another upload would help. Perhaps there is some additional information included in that upload which would resolve those relationships.

+ 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] Lookup for a date between 2 other dates which matches the given criteria
    By hazeljohn19 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2017, 07:56 AM
  2. Power Pivot - Lookup based on Last Closest Date/Time
    By ELeGault in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-17-2015, 06:48 AM
  3. How to lookup value based on Date time closest to criteria
    By ilionel1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2013, 02:01 PM
  4. Current date lookup and closest time display
    By Am I Wry in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2013, 02:44 PM
  5. [SOLVED] Formula to lookup a value in a row on a spreadsheet that matches name and date
    By jsclark in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-15-2013, 08:24 PM
  6. [SOLVED] Finding the closest Date - Lookup
    By dluhut in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 05-08-2013, 04:58 PM
  7. VBA to lookup data in another sheet if date matches.
    By chris_waldie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2005, 04:42 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