I need a way to look up multiple criteria in a table. Which I can usually do no problem with the below type formula
=IFERROR(INDEX(Table1[PriceA],MATCH(L6&L7,Table1[Item]&Table1[Size],0)),0)
However I need one of the table header look ups (PriceA) to change depending on a result from another Cell (L8). So depending on the answer in L8 could be PriceA or PriceB or PriceC, but putting L8 in the forumla as a header look up doesn't work. (please note this is just a simplified example as my spreadsheet is much larger and contains sensitive data)
=IFERROR(INDEX(Table1[PriceA],MATCH(L6&L7,Table1[Item]&Table1[Size],0)),0)
However I need one of the table header look ups (PriceA) to change depending on a result from another Cell (L8). So depending on the answer in L8 could be PriceA or PriceB or PriceC, but putting L8 in the forumla as a header look up doesn't work. (please note this is just a simplified example as my spreadsheet is much larger and contains sensitive data)
Book1 | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | |||
1 | |||||||||||||||||||||
2 | |||||||||||||||||||||
3 | |||||||||||||||||||||
4 | |||||||||||||||||||||
5 | Item | Size | PriceA | PriceB | PriceC | ||||||||||||||||
6 | Hoodie | small | 17 | 14 | 19 | Item | T-shirt | ||||||||||||||
7 | Hoodie | medium | 19 | 16 | 21 | Size | Small | ||||||||||||||
8 | Hoodie | large | 18 | 15 | 20 | Brisbane | PriceA | ||||||||||||||
9 | T-Shirt | small | 20 | 17 | 22 | Cost | =IFERROR(INDEX(Table1[L9],MATCH(L6&L7,Table1[Item]&Table1[Size],0)),0) | ||||||||||||||
10 | T-shirt | medium | 16 | 13 | 18 | ||||||||||||||||
11 | T-shirt | large | 15 | 12 | 17 | ||||||||||||||||
12 | T-shirt | x-large | 21 | 18 | 23 | ||||||||||||||||
13 | |||||||||||||||||||||
14 | |||||||||||||||||||||
15 | |||||||||||||||||||||
16 | Brisbane | PriceA | |||||||||||||||||||
17 | Sydney | PriceB | |||||||||||||||||||
18 | Perth | PriceA | |||||||||||||||||||
19 | Cairns | PriceA | |||||||||||||||||||
20 | Darwin | PriceB | |||||||||||||||||||
21 | Tasmania | PriceB | |||||||||||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
L8 | L8 | =IF(K8="Brisbane","PriceA","PriceB") |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
K8 | List | =$D$16:$D$21 |