View Single Post
  #13   Report Post  
Sandy Mann
 
Posts: n/a
Default

Aladin,

"Aladin Akyurek" wrote in message
...
Remember that...

($E$157:$E$5105={"LAN","PFT","PF"})

is not an efficient idiom.


Can you verify, (or correct me if I am wrong), that the reason that you say
that it is an *inefficient idiom* is because, using the OP's original data
and formula:

COL A COL B COL C
PF LAN 0
PF PFT 1

=SUMPRODUCT((A1:A2="PF")*(B1:B2={"LAN","PFT"})*(C1 :C2))

(A1:A2="PF") evauates to TRUE;TRUE but (B1:B2={"LAN","PFT"}) evaluates to
TRUE,FALSE;FALSE,TRUE so the (A1:A2="PF") has to be evaluated twice to
match the (B1:B2={"LAN","PFT"}) whereas in
=SUMPRODUCT((A1:A2="PF")*((B1:B2="LAN")+(B1:B2="PF T"))*(C1:C2))
(A1:A2="PF") only gets evaluated once although B1:B2 still gets evaluated
twice, but then it was being evaluated twice anyway.

--

Sandy

Replace@mailinator with @tiscali.co.uk

..