Ignore Duplicate Values in a VLOOKUP formula

Craig Peter DG

New Member
Joined
Sep 10, 2016
Messages
33
Office Version
  1. 2013
Hi folks
In my table array I have quite a few duplicate item numbers in Column A. I need them to stay in there as i have referenced the duplicates in other function outputs. However, for one of my function outputs i actually want to IGNORE those duplicate values and only give me a result based on each UNIQUE item number. Anyone suggest a modification to the VLOOKUP function I would use please? Or is not a VLOOKUP i need at all?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi Craig Peter DG,

You could check first with COUNTIF

Craig Peter DG.xlsx
ABCDEF
1ItemDataItems to Search
2X20DogX80Badger
3X30CatX70Cow
4X40MoleX60Sheep
5X40GoatX40 
6X60SheepX30 
7X70CowX20Dog
8X80BadgerX120Hedgehog
9X40GoatX100Pig
10X100Pig
11X40Goat
12X120Hedgehog
13X30Cat
Sheet1
Cell Formulas
RangeFormula
F2:F9F2=IF(COUNTIF($A$2:$A$13,E2)>1,"",VLOOKUP(E2,$A$2:$B$13,2,0))
 
Upvote 0
Solution
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Another option, depending on version
+Fluff 1.xlsm
ABCDEF
1ItemDataItems to Search
2X20DogX20Dog
3X30CatX60Sheep
4X40MoleX70Cow
5X40GoatX80Badger
6X60SheepX100Pig
7X70CowX120Hedgehog
8X80Badger
9X40Goat
10X100Pig
11X40Goat
12X120Hedgehog
13X30Cat
Results
Cell Formulas
RangeFormula
E2:E7E2=UNIQUE(A2:A13,,1)
F2:F7F2=VLOOKUP(E2#,A2:B13,2,0)
Dynamic array formulas.
 
Upvote 0
Hi Craig Peter DG,

You could check first with COUNTIF

Craig Peter DG.xlsx
ABCDEF
1ItemDataItems to Search
2X20DogX80Badger
3X30CatX70Cow
4X40MoleX60Sheep
5X40GoatX40 
6X60SheepX30 
7X70CowX20Dog
8X80BadgerX120Hedgehog
9X40GoatX100Pig
10X100Pig
11X40Goat
12X120Hedgehog
13X30Cat
Sheet1
Cell Formulas
RangeFormula
F2:F9F2=IF(COUNTIF($A$2:$A$13,E2)>1,"",VLOOKUP(E2,$A$2:$B$13,2,0))
thanks
 
Upvote 0

Forum statistics

Threads
1,212,928
Messages
6,110,734
Members
448,294
Latest member
jmjmjmjmjmjm

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