It's more efficient to use:
=SUMPRODUCT(--($C$157:$C$5105="PF"),--ISNUMBER(MATCH($E$157:$E$5105,{"LAN","PFT","PF"},0)),$Q$157:$Q$5105)
instead of
=SUMPRODUCT(($C$157:$C$5105="PF")*($E$157:$E$5105={"LAN","PFT","PF"})*($Q$157:$Q$5105))
If you're not getting the desired figure, you have probably extraneous
chars in cells with PF, LAN, etc. Try to run the TrimAll macro on the
relevat ranges (The macro can be found by means of a search with Google).
I am getting a zero...like it doesn't recognize the cell containing the
number 1. I have used this formula earlier in the worksheet and it is
working. I did run into the same issue on another part of the spreadsheet
but if I re-typed the criteria (in this case PF), the formula would run
correctly. The range on my spreadsheet is 157-5005 and I'm using 3 col.
Here is the exact formula I am using:
COL C COL E COL Q
PF LAN 0
PF PFT 1
=SUMPRODUCT(($C$157:$C$5105="PF")*($E$157:$E$5105={"LAN","PFT","PF"})*($Q$157:$Q$5105))
:
--
[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.