COUNTIF

  • Thread starter Thread starter Mike
  • Start date Start date
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
 
=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)
 
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)
 
Back
Top