+ Reply to Thread
Results 1 to 2 of 2

Using VLookup on one table to get a value from another but only looking at certain values?

  1. #1
    Registered User
    Join Date
    03-21-2017
    Location
    Belfast
    MS-Off Ver
    OFFICE 365
    Posts
    16

    Using VLookup on one table to get a value from another but only looking at certain values?

    Hey guys,

    Can I have a vlookup formula that looks for a value in another table but only searches for the range of values after a certain date?

    Table 1

    ID | Date

    1 | 04/02/2018
    2 | 05/02/2018

    Table 2

    ID | Quantity | Date
    1 | 40 | 02/02/2018
    1 | 50 | 05/02/2018
    2 | 100 | 06/02/2018


    So I would want my Vlookup formula to pick up the 2nd ID = 1 value in table 2 because it is the one after the date in table 1.

    Is there any way I can set up a formula to do this?

    I did a vba solution where I copied out all the values after a certain date onto a new table and vlookup then copied and pasted the results as values. This worked.

    The issue now is that I have to incorporate in the time as well to make sure I am taking the value after the date and time of the date and time in table 1. The vba solution woulnd't work for that because I would have to do to many interval copy and pastes.

    Thanks in advance,

    D

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Using VLookup on one table to get a value from another but only looking at certain val

    Will you please attach a sample Excel workbook?

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. VLookup multiple values in lookup table - how can I sum?
    By trstew in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2016, 12:31 AM
  2. [SOLVED] vba vlookup table values and compare to values listed in Column B
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-26-2016, 08:34 AM
  3. adding vlookup values from 2 table arrays
    By bduprey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-22-2015, 12:25 PM
  4. Vlookup a table, to another table that has multiple values
    By marshahannah in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-24-2014, 12:15 PM
  5. Multiple values in vlookup table A
    By capricorn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2013, 01:29 PM
  6. Fetch values from one table to another using VLOOKUP
    By Henrik_ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-16-2012, 11:29 AM
  7. VLOOKUP using another table for comparison values
    By Karen S. in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-15-2006, 05:00 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