+ Reply to Thread
Results 1 to 4 of 4

Two Column Lookup and Return More than One Value

  1. #1
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Two Column Lookup and Return More than One Value

    Hello, Experts of Excel,

    I'm currently in a quandary of a problem in which I have a list of data in which I'm hoping to return the values that match both column 1 and column 2 and would return values in columns C and D. I have a data sheet that contains all the returning values that those columns match. I have enclosed a sample of this problem. I have figured out that using VBA would be better used instead of using formula since the results would return a lot quicker and I don't have to worry about excel unexpectedly crashing due to the amount of data being looked up and returned. Below is a VBA code that returns the value of one column based on if columns 1 and 2 matches, but I'm hoping to get some guidance on how to build upon this code (or get a better code) to return more than one value.

    Here's the code:

    Please Login or Register  to view this content.
    Any help with this would be appreciated

    Thanks!
    Attached Files Attached Files
    Last edited by Excell1677; 07-16-2021 at 08:06 AM. Reason: Forgot to add code

  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,879

    Re: Two Column Lookup and Return More than One Value

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Two Column Lookup and Return More than One Value

    One way...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Re: Two Column Lookup and Return More than One Value

    Hi Sintek,

    Thanks for looking into this and sorry for the delayed reply, but I have used this formula and it works great! Thanks again!

+ 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] V lookup - return value in another column if cell within v-lookup column is blank
    By Jacks18928 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-06-2019, 06:46 AM
  2. Lookup value in column A of range and return actual value of column c
    By brian_2me in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2018, 07:32 PM
  3. [SOLVED] Lookup two column for matches and return largest values from third column
    By abulkhairi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-13-2017, 01:54 AM
  4. Two Lookup and Return (Lookup the column, then lookup the row)
    By Branbran10 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-05-2015, 04:55 PM
  5. Replies: 1
    Last Post: 11-13-2013, 04:03 PM
  6. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  7. Replies: 1
    Last Post: 01-05-2011, 05: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