Conditional Vlook up in Excel

87 views Asked by At

I have a table for seller name and sales

enter image description here

I am matching data for : enter image description here

For Mark I an use simple vlook up formula but for Susan it is returning see other. I want that it should look on other where Mark is assigned for Susan. It should go to again seller column and look for Mark and return 300 in Susan column instead of see other and return 140 for stephan. How can I make formula which can return value for Mark as well as Susan correctly?

2

There are 2 answers

0
bosco_yip On

Try this formula solution using Vlookup +If function.

In F2, formula copied down :

=IFERROR(VLOOKUP(VLOOKUP(E2,IF({1,0},$B$1:$B$7,$A$1:$A$7),2,0),$B$2:$C$7,2,0),VLOOKUP(E2,$B$2:$C$7,2,0))

enter image description here

0
Devon Allary On

It's a bit of a confusing table setup, but the below formula should work. Just replace the {name_cell} with whatever cell is pointing to Mark or Susan.

=IF(INDEX(Table1[Sales],MATCH({name_cell},Table1[Seller],0))="see other",
INDEX(Table1[Sales],MATCH(INDEX(Table1[Other],MATCH({name_cell},Table1[Seller],0)),Table1[Seller],0)),
INDEX(Table1[Sales],MATCH({name_cell},Table1[Seller],0)))