I'm trying to write a formula that can return a cell value using INDEX
and MATCH
but I can't make it work. I have the following setup:
year person pet friend sale
1 jeff scout matt computer
1 carole riley tom mouse
2 jeff sadi trung computer
2 carole daisy ellen mouse
Say I have three cells:
year 2
col person
sale mouse
RESULT: carole [year = 2, sale = mouse, column value from 'person']
Is there a way I can use index and match to zero in on the specific cell? I will always have a year and sale provided. However, the column (person, pet, or friend) will change so I need to find the value in that particular column where the year and mouse match the cells.
Once I get a formula to work I'm going to write a more general function, but I need help getting the INDEX/MATCH combo to work properly.