Multiple Criteria Lookup

Let's say you want to find to something in Column C by refering to criteria in cells D1 and E1 as below (looking up ages is just an example)

First Names are in Column A

Last Names are in Column B

Ages are in Column C

First Name Reference = D1

Last Name Reference = E1

=SUMPRODUCT((A1:A1000=D1)*(B1:B1000=E1)*(C1:C1000))

You can't use entire columns for ranges but entire rows are okay.

or

{=SUM((A1:A1000=D1)*(B1:B1000=E1)*C1:C1000)}

Must be entered as an array. (Push Ctrl, Shift and Enter simultaneously)

or

{=SUM(IF(A1:A1000=D1,IF(B1:B1000=E1,C1:C1000)))}

Must be entered as an array. (Push Ctrl, Shift and Enter simultaneously)

Note: If Column C did not have numerical values the first 2 formulas would return #VALUE! errors while the third formula would return 0. The following formula works better in this case.

{=INDEX(C1:C1000,MATCH(1,(A1:A1000=D1)*(B1:B1000=E1),0))}

Must be entered as an array. (Push Ctrl, Shift and Enter simultaneously)



© Copyright andrewsexceltips.net All Rights Reserved.