My data looks like:
id state value
1 abc x
1 bcd y
1 def z
2 abc p
2 bcd q
2 def r
3 bcd m
3 def n
I am trying to vlookup the value for id 1, 2 and so on, but where the state is not abc. Excel automatically picks the first entry and I tried with if condition on the column but am unable to get it work. I even tried Index Match with an if condition inside match, but that didn't work either.
Is there a way I could do it?