ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Multiple matches on VLOOKUP (https://www.excelbanter.com/excel-worksheet-functions/25380-multiple-matches-vlookup.html)

[email protected]

Multiple matches on VLOOKUP
 
Question about VLOOKUP...


In Sheet1, I have my source data.

| A | B |
-------------------------
1 | 1 | =vlookup(a1,map,2, false)
--------------------------
2 | 2 | =vlookup(a2,map,2, false)


In Sheet2, I have my "map" defined for cells A1:B4

| A | B |
---------------------------------
1 | 1 | data1
---------------------------------
2 | 2 | data2
---------------------------------
3 | 2 | data2b
---------------------------------
4 | 2 | data2c
---------------------------------

The first record works great.

The second one poses a problem since I have multiple occurences of
record #2. It only picks up the first one.

Any idea how I can have all occurences returned?

Thanks.


Dennis Hancy
Eaton Corporation
Cleveland, OH


Bernd Plumhoff

Hello Dennis,

maybe my vlookupall() function can help you:
http://www.sulprobil.com/html/vlookupall.html

HTH,
Bernd

Peo Sjoblom

Here's a formula that can retrieve more than one match

http://tinyurl.com/e39qs

however I would personally use a filter


Regards,

Peo Sjoblom

" wrote:

Question about VLOOKUP...


In Sheet1, I have my source data.

| A | B |
-------------------------
1 | 1 | =vlookup(a1,map,2, false)
--------------------------
2 | 2 | =vlookup(a2,map,2, false)


In Sheet2, I have my "map" defined for cells A1:B4

| A | B |
---------------------------------
1 | 1 | data1
---------------------------------
2 | 2 | data2
---------------------------------
3 | 2 | data2b
---------------------------------
4 | 2 | data2c
---------------------------------

The first record works great.

The second one poses a problem since I have multiple occurences of
record #2. It only picks up the first one.

Any idea how I can have all occurences returned?

Thanks.


Dennis Hancy
Eaton Corporation
Cleveland, OH




All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com