+ Reply to Thread
Results 1 to 6 of 6

Doing a VLOOKUP and returning multiple entries

  1. #1
    Registered User
    Join Date
    01-28-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Doing a VLOOKUP and returning multiple entries

    Hi, I've been working on a sheet and have run into a problem. See the attached example to follow along.

    Basically, I want to do a VLOOKUP of the value of A9 in A2:A6, then return the corresponding value from column D. Your basic VLOOKUP, but the problem is that it will only return the first value. I want it to return all values pertaining to A9 (in this case, X -- so the returned values would be orange, pink, and red).

    I'd like the returned values to come up in a vertical list starting at, say, A11.

    Thanks in advance for the help.
    Attached Files Attached Files

  2. #2
    Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: Doing a VLOOKUP and returning multiple entries

    Hello

    See attached file. Formulas in green coloured cells. Hope this helps u
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Doing a VLOOKUP and returning multiple entries

    look at the example attached.
    modytrane
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-28-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Doing a VLOOKUP and returning multiple entries

    Quote Originally Posted by vandanavai View Post
    Hello

    See attached file. Formulas in green coloured cells. Hope this helps u
    Thanks. That appears to be what I want, but could you explain what this does (specifically the bolded part) and how I could change it if my range of data is on another sheet:

    $B$9&ROW()-9
    What does the "-9" do?

    Thanks.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Doing a VLOOKUP and returning multiple entries

    using row() or even column() is a useful method of incrementing something if you put =a1&1 in a cell and dragged down it would simply repeat the 1 so =a2&1, a3&1 and so on so using row returns the row number the formula is in and as it is dragged down it increments. but say you want to go up 1,2,3 and your formula is in row 60 you'd need to take away the 59 to return 1.
    so when you see say starting in 21st row =a1&row()-20 that is = a1&1 then dragged down a2&row()-20 is a2&2
    Last edited by martindwilson; 01-30-2009 at 10:54 AM.

  6. #6
    Registered User
    Join Date
    01-28-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Doing a VLOOKUP and returning multiple entries

    Quote Originally Posted by martindwilson View Post
    using row() or even column() is a useful method of incrementing something if you put =a1&1 in a cell and dragged down it would simply repeat the 1 so =a2&1, a3&1 and so on so using row returns the row number the formula is in and as it is dragged down it increments. but say you want to go up 1,2,3 and your formula is in row 60 you'd need to take away the 59 to return 1.
    so when you see say starting in 21st row =a1&row()-20 that is = a1&1 then dragged down a2&row()-20 is a2&2
    Thanks that helped a lot. It looks like it's solved! Thanks everyone!

+ 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