I need a formula that can be pasted into cells B2:D5
in the sheet displayed in the image below. The formula should see if the value for the row in column A
matches a color in row G
and if the value for the column in row 1
matches a animal in row H
. For all cells without a two part match it should return a blank ""
. If there is a two way match then it returns the numerical value in column I
Asked
Active
Viewed 71 times
0

FinDev
- 429
- 5
- 16
-
1SUMIFS and COUNTIFS, or more inspiration [here](https://stackoverflow.com/questions/42492758/vlookup-using-2-columns-to-reference-another). – BigBen Jan 13 '21 at 20:32
1 Answers
1
Put this formula in B2, then copy across and down:
=IF(SUMIFS($I$2:$I$7,$G$2:$G$7,$A2,$H$2:$H$7,B$1)=0,"",SUMIFS($I$2:$I$7,$G$2:$G$7,$A2,$H$2:$H$7,B$1))

eyllanesc
- 235,170
- 19
- 170
- 241

Solver Max
- 391
- 1
- 2
- 6
-
2This does assume that the data in the `Value` column is never `0`: note to @FinDev. – BigBen Jan 13 '21 at 20:45
-
2to avoid the double entry of the formula: `=IFERROR(1/(1/SUMIFS($I$2:$I$7,$G$2:$G$7,$A2,$H$2:$H$7,B$1)),"")` – Scott Craner Jan 13 '21 at 20:48