# Return Specific Value using VLOOKUP ?

I got one list with some values that might be duplicated, however, column associated with it is different, like: ( possible values are only 4 DRY,RFG,FRZ,CHOC  )

1 DRY

1 RFG

2 RFG

3 FRZ

Every time I have duplicates, as the first 2 rows, I would like to apply and specific value, in this specific example the value would be "RFG" ...how can I do it ?

This would be the rules :

1. Unique values keep their 2nd column value
2. Duplicates that contain RFG should be consolidated as RFG
3. Duplicates that contain FRZ should be consolidated as FRZ
4. Duplicates that contain CHOC should be consolidated as RFG
Example.xlsx
###### Who is Participating?

Commented:
Hi LubinofS,

Enter the following into C2:

=IF(COUNTIF(\$A\$2:\$A\$8085,A2)=1,B2,IF(COUNTIFS(\$A\$2:\$A\$8085,A2,\$B\$2:\$B\$8085,"RFG")>0,"RFG",IF(COUNTIFS(\$A\$2:\$A\$8085,A2,\$B\$2:\$B\$8085,"FRZ")>0,"FRZ",IF(COUNTIFS(\$A\$2:\$A\$8085,A2,\$B\$2:\$B\$8085,"CHO")>0,"RFG",""))))

Matt
0

Author Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.