vlookup hitting duplicate values?

LucidCheetah

New Member
Joined
Dec 11, 2017
Messages
15
I built a spreadsheet for tracking containers at work a while back. it would search column b of sheet2 for the value input into sheet 1 and return the associated value found in column a on sheets 2. Initially we did not have any duplicate container IDs. Having added new containers to our inventory we now have some containers with overlapping ID#s. Problem now is that the vlookup seems to stop at the first instance of the number it finds and returns the associated value from column a. If the Container in questions is further down the list, we get the wrong informationr eturned associated with the first value. is there a way using vlookup that it can identify the duplicate value?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX(Sheet2!$A$2:$A$200,SMALL(IF(Sheet2!$B2:$B$200=$A2,ROW(Sheet2!$A$2:$A$200)-ROW(Sheet2!$A$2)+1),ROWS($1:1))),"")

where A2 houses an ID of interest you are looking for.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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