Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Look up a value in a table based on two input values

I am very familiar with vlookup and hlookup functions in Excel. However, I am looking for a method of doing both. Take this example:

        A             B        C  
1                     Resources
2   Task            Mgr   Sr. Mgr
3   -----------------------------
4   Task 1          30%       70%
5   Task 2          40%       60%
6   Task 3          50%       50%
7   Task 4          70%       30%

If I wanted to put a formula in a new cell to look up both a task and a resource type to return the appropriate percentage, how could I do this?

like image 397
cLFlaVA Avatar asked Dec 22 '22 13:12

cLFlaVA


1 Answers

A combination of INDEX and MATCH will do the trick:

=INDEX($B$4:$C$7,MATCH("Task 3",$A$4:$A$7,0),MATCH("Mgr",$B$2:$C$2,0))

like image 163
e.James Avatar answered Jan 06 '23 17:01

e.James