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")

How could write the above formula based on a ceertain location in column B.
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
 
Try the Conditional Sum Wizard under the tools menu. That will let your
formula only execute if colum B = Boston.
 
Back
Top