+ Reply to Thread
Results 1 to 2 of 2

[SOLVED] Retrieving the Entire Row of a Matched Value

  1. #1
    marlea
    Guest

    [SOLVED] Retrieving the Entire Row of a Matched Value

    If the lookup value is repeated several times in a column, how do you use VLOOKUP to return data from ALL of the corresponding rows?

  2. #2
    Forum Contributor
    Join Date
    12-07-2004
    Posts
    596

    Retrieving the Entire Row of a Matched Value

    Problem:

    The range A1:E6 contains ID, name, gender, and age data for a group of people.
    We want to lookup the data range for each ID listed in column G and retrieve all data from the matching row.

    Solution 1:

    Use the VLOOKUP function as shown in the following Array formula:
    {=VLOOKUP(G2,$A$2:$E$6,{2,3,4,5},FALSE)}
    Select range H2:K2 and enter the above Array formula.
    Then, copy/paste the formula from cells H2:K2 to H3:K4.

    To apply Array formula:
    Select the cell, press

    Solution 2:

    Use the INDEX and MATCH functions as shown in the following formula in cell H7:
    =INDEX(B$2:B$6,MATCH($G2,$A$2:$A$6,0),1)
    Copy the formula and paste it to all cells in the range H7:K9.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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