Lookup using two values - like an SQL in the same workbook
Hall wrote:
I have a table of data. Elsewhere in the workbook, I want to include a
formula to count all the rows in that table that have a value of "A" in the
first column and a "B" in the second column. Kind of like
With the As in A1:A10 and the Bs in B1:B10 use this formula:
=SUMPRODUCT((A1:A10="a")*(B1:B10="b"))
You can also use =SUM((A1:A10="a")*(B1:B10="b")) as a matrixformula (end
it with ctrl+shift+enter) if you like.
/Sune
|