Find more than 1 Value in a lookup

rline101

Board Regular
Joined
Dec 22, 2005
Messages
71
I am doing a vlookup which is working fine. But vlookup only returns the 1st occurrence of the lookup value. My array has more than one occurrence of the lookup value, and I need it to locate all such occurrences, not just the 1st one.

Eg. col A has John, Ted, Peter, John, Fred, John (going downwards)
col B has 7,9,4,8,5,2

In cell D1, I need Excel to find the 1st occurrence of John's name and return the value 7.

In cell E1 I need it to find the 2nd occurrence and return the value 8.


Cell F1 needs to end up with the value 2.

If there are more occurrences, they need to go in cells G1, H1 etc. This needs to happen for anything up to 20 times.

How can I get Excel to do this? Any help would be really appreciated!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,215,949
Messages
6,127,892
Members
449,411
Latest member
AppellatePerson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top