Baseball wins

  • Thread starter Thread starter Ken Schmidt
  • Start date Start date
K

Ken Schmidt

I have 2 columns of baseball data; one with either a "W" or "L" depending if
the team won or lost, and the other has the number of runs scored in each
game. What I want to do is calculate the number of wins for each number of
runs scored. For example, how many times did the team win when they scored
exactly 3 runs. I have tried to solve this with an array formula but just
can't get it to work. Any help would be appreciated. Running Excel 97.

Ken
 
Jim:

I couldn't get your formula to work, but finally figured out one that does:

=SUM(IF(A2:A100="W",IF(B2:B100=3,1,0),0))

This is an array formula. Thanks for your reply.

Ken
 
There was a small typo in Jim's formula:

=SUMPRODUCT((A2:A100="W")*(B2:B100=3))

(the A2:100 should have been a2:a100. When I changed that, it worked fine for
me.)

If you're doing this for lots of scores, you may want to look at
Data|Pivottable.

You can make a pretty nice summary with just a minor amount of work.


Count of W/L RUNS
W/L 1 2 3 4 Grand Total
L 4 5 1 4 14
W 8 4 1 5 18
Grand Total 12 9 2 9 32

and pivotting rows to columns:

Count of W/L W/L
RUNS L W Grand Total
1 4 8 12
2 5 4 9
3 1 1 2
4 4 5 9
Grand Total 14 18 32
 
Back
Top