View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default conditional formula using sumproduct

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"ferde" wrote in message
...
Thank you works great

"T. Valko" wrote:

If column B contains only the logical values TRUE or FALSE:

=SUMPRODUCT((A2:A6="6N")*B2:B6)

--
Biff
Microsoft Excel MVP


"ferde" wrote in message
...
A--------------B-
6N FALSE
6N FALSE
7N TRUE
8N TRUE
6N TRUE

I am using this as an array formula in C2 but getting zero for an
answer
when the correct answer would be 1. Can anyone tell me what I am doing
wrong. I am looking for the formula to count the number of times
"TRUE"
is
found in B2:B6 IF "6N" is also found in A2:A6. Any help would be
greatly
appreciated.

SUMPRODUCT((A2:A6="6N")*(B2:B6="TRUE"))

correct answer =1