Using SUMPRODUCT to count values in separate columns
I think you should remove the quotes from "true". In quotes it becomes
text and
=TRUE="true"
will return FALSE
Also, if you correct the syntax (as per Carim's suggestions) in your
first formula it might work better in case some of the "yes" have a
trailing invisible space.
=SUMPRODUCT(ISNUMBER(SEARCH("yes",K2:K66))*(M2:M66 =TRUE))
or
=SUMPRODUCT(ISNUMBER(SEARCH("yes",K2:K66))*M2:M6)
Multiplication of TRUE will coerce it to 1.
HTH
Kostis Vezerides
S Stunell wrote:
"Carim" wrote:
Hi,
=SUMPRODUCT(--(K2:K66="Yes")*--(M2:M66="True"))
should do the job ...
HTH
Carim
Hi Carim and thanks for the swift response. I have cut and pasted this into
my spreadsheet and although a valid function it returns a value of '0'. Any
reason why this may be?
Thanks
Simon
|