Try this in cell B2:
=SUMPRODUCT(--(D1:D1949="IBM"),--(E1:E1949=TRUE))/SUMPRODUCT(--(D1:D1949="IBM"))
Slight modification:
=SUMPRODUCT((D1:D1949="IBM")*(E1:E1949=TRUE))/SUMPRODUCT(--(D1:D1949="IBM"))
See this site for a great description of how sumproduct works:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
You may want to try IBM in cell A1 and True in cell A2, an dthis use this
function:
=SUMPRODUCT(--(D1:D1949=A1),--(E1:E1949=A2))/SUMPRODUCT(--(D1:D1949=A1))
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
"carl" wrote:
Hi.
My data table looks like this - located in D1:E8
Stock Condition
IBM TRUE
IBM TRUE
IBM FALSE
IBM TRUE
IBM FALSE
GOOG TRUE
GOOG TRUE
I am trying to find a formula (B2) for this table - located in A1:B2
IBM Match
#1 60%
Where the formula in B2 looks at my data table, finds rows that have the
value in A1, then returns the result of the calculation (# of "TRUE") divided
by (Total Number) - in the case for IBM, 3 divided by 5.
Thank you in advance.