Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Lookup Return Unique Value

Tags:

excel

I have two sheets one has

Item   ID
Box    78
Glue   105
Box    85

The other sheet

Item    ID
Box
Box
Glue

On the second sheet I want to look up the an ID from the first sheet.

Where there I duplicates (as in Box) I want to return the IDs one at a time. So the lookup on Box would return 78 the first time, and 85 the second time.

Like this:

Item    ID
Box     78
Box     85
Glue    105
like image 768
user290687 Avatar asked Nov 17 '25 23:11

user290687


1 Answers

Alternate solution. Does not require helper columns, does not require array entry. In Sheet2 cell B2 and copy down:

=INDEX(Sheet1!$B$2:$B$4,MATCH(1,INDEX((Sheet1!$A$2:$A$4=A2)*(COUNTIF(B$1:B1,Sheet1!$B$2:$B$4)=0),),0))
like image 85
tigeravatar Avatar answered Nov 19 '25 14:11

tigeravatar