+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP using range of dates

  1. #1
    Registered User
    Join Date
    05-07-2020
    Location
    Hammonton, NJ USA
    MS-Off Ver
    365
    Posts
    4

    VLOOKUP using range of dates

    I have two tables:

    Authorizations include a Start Date and an End Date, and an Auth Number.
    Sessions includes a Session Date and a blank column for Auth Number.

    How can I use VLOOKUP to find a matching Auth Number, using the Session Date to look up into the Authorizations table?
    The logic needs to find an Auth Number in the Authorizations table where the Session Date is on or after the Start Date, AND the Session Date is on or before the End Date.

    I'll code up an example if anyone needs it to see this clearly.

    Thanks!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: VLOOKUP using range of dates

    Read the yellow banner at the top of this page on how to upload samples.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-07-2020
    Location
    Hammonton, NJ USA
    MS-Off Ver
    365
    Posts
    4

    Re: VLOOKUP using range of dates

    Here's an example worksheet.
    Attached Files Attached Files

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

    Re: VLOOKUP using range of dates

    Hello gdstuart. Welcome to the forum.

    From where do you get 1538618597 in Manual Result cell H3?

    If that is a 'typo' try this in G3 and fill down instead of VLOOKUP.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 05-07-2020 at 11:12 PM.
    Dave

  5. #5
    Registered User
    Join Date
    05-07-2020
    Location
    Hammonton, NJ USA
    MS-Off Ver
    365
    Posts
    4

    Re: VLOOKUP using range of dates

    Quote Originally Posted by FlameRetired View Post
    Hello gdstuart. Welcome to the forum.

    From where do you get 1538618597 in Manual Result cell H3?

    If that is a 'typo' try this in G3 and fill down instead of VLOOKUP.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It was a typo, pardon my slop.

    There is one more specification. The Authorization table also contains a Patient ID. Authorizations are issued for each Patient. Authorization numbers are unique for each Patient ID (i.e. not repeated for a different Patient ID).

    INDEX and MATCH are indeed working fine but now how can I incorporate the additional specification so the Authorization table is only queried for an auth that was issued to the specific Patient ID?

    I updated the example to include this new spec.

    Thanks so much for the prompt reply.
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: VLOOKUP using range of dates

    @gdstuart

    Please don't quote whole posts -- it's just clutter.*If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: VLOOKUP using range of dates

    Try in cell I3 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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] Vlookup result only when an id matches AND dates are within a range
    By unreal_event_horizon in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-10-2017, 12:38 PM
  2. Match or Vlookup: Finding the name value within a range of dates?
    By Tia_ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-01-2016, 03:13 PM
  3. Range of dates for Vlookup
    By controlrex in forum Excel General
    Replies: 2
    Last Post: 04-21-2016, 08:38 PM
  4. VLOOKUP for a range of dates
    By skillsguy in forum Excel General
    Replies: 5
    Last Post: 02-03-2015, 03:53 AM
  5. Excel 2007 : Using VLOOKUP to find a range of dates
    By vjpemberton13 in forum Excel General
    Replies: 3
    Last Post: 04-18-2012, 02:50 PM
  6. Workday and Vlookup to select a range of holiday dates
    By vadius in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-29-2011, 10:28 AM
  7. vlookup over range of dates
    By Chuckers in forum Excel General
    Replies: 3
    Last Post: 02-02-2010, 10:18 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