Reputation: 129
Hello I'm trying to find a value (id) in an excel csv file but based on two different criteria. This value can have multiple references therefore I need to obtain the ID based on other two fields, I tried using xlookup and index-match functions but since these values are mixed in the CSV I'm getting an incorrect result.
In the below image example the correct ID I need to get is the one in green. If I use the xlookup function looking for the vaccine3 ID I'll get the first appearance, but this is link to product A5 and not to A7, which is the correct one.
Thanks for the help.
Upvotes: 0
Views: 71
Reputation: 2494
If you enter this formula in C4
then it should return the correct-id
=INDEX($D$2:$D$10,MATCH(B4&A4,$E$2:$E$10&$F$2:$F$10,0))
Upvotes: 1