VLookup or Index Match Multiple Specific Text

habibwfm

New Member
Joined
Aug 5, 2016
Messages
2
Really hoping I can get some help with my issue.

I have a bunch of Products in Column C of which many are duplicated. In Column D I have the locations of the IDs of which there can be two.

I want to know when an ID is in both locations but vlookup and index match only shows me the first instance and not the second unique instance.

Below is a sample of my data. My actual data is over 30000 rows and can be longer or shorter in other instances.

Thanks!

ProductsLocation
123456SLFL
123456BKRM
123456SLFL
555555SLFL
555555SLFL
555555SLFL
555555SLFL
555555BKRM
555555BKRM
123456SLFL
123456BKRM

<tbody>
</tbody>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
If products are in column A, and Locations in column B, try using the frequency function within an array:

=SUM(--(FREQUENCY(IF($B$2:$B$14<>"",IF($A$2:$A$14=A2,MATCH($B$2:$B$14,$B$2:$B$14,0))),ROW($B$2:$B$14)-ROW(B2)+1)>0))

I have made up a data set and applied this formula to column C and it will return either 1 or 2 depending on whether there are one or two locations. It is an array, so must be entered by ctrl+shift+enter. It could be slow if you are looking over 30,000 rows.
 
Upvote 0

Forum statistics

Threads
1,215,679
Messages
6,126,180
Members
449,296
Latest member
tinneytwin

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