COUNTIF

M

Mike

Hello all,
Using Excel XP.

I have a formula in column Q that gives an overall running win and lost
record based on either a W (for a win) or an L (for a lost) in column P.

An example in cell P4 is a W so the formula would give a result of 1-0
P5 is an L so the formula would give a
result of 1-1
P6 is an L so the formula would give a
result of 1-2

=COUNTIF($P$4:p4,"W")&"-"& COUNTIF($P$4:p4,"L")
=COUNTIF($P$4:p5,"W")&"-"& COUNTIF($P$4:p5,"L")
=COUNTIF($P$4:p6,"W")&"-"& COUNTIF($P$4:p6,"L")

I would like to find out the home win and lost record if the location in
column B is equal to Boston. I tried adding another countif but it still
gave me the overall record. Any help would be appreciated.

Mike
 
B

Bob Phillips

=SUMPRODUCT(--($B$4:B4="Boston"),--($P$4:p4="W"))&"-"&SUMPRODUCT(--($B$4:B4=
"Boston"),--($P$4:p4="L"))

etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
M

Mike

Thanks Bob so much. Great help!!
Mke
Bob Phillips said:
=SUMPRODUCT(--($B$4:B4="Boston"),--($P$4:p4="W"))&"-"&SUMPRODUCT(--($B$4:B4=
"Boston"),--($P$4:p4="L"))

etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top