Need Baseball Stats formula

D

Dan O'Shea

This explanation may be quite complicated, but the formula to someone
here may be easy:

I run a fantasy baseball league and trying to show the other fantasy
players some pitcher stats.

Each name below represents a pitcher, and the positive numbers are
wins and how much they won by. The negative numbers are losses and how
much they lost by.

Myers 8
Myers 5
Myers -3
Myers -1
Davis 2
Davis -6
Reeds 5
Reeds -2
Reeds -5
Reeds -1
Jones 4
Jones 2

I have literally thousands of rows and what I want to be able to do is
have a formula at the top that I can paste all the way down with. The
formula must accomplish t things:

1- Show the won-loss record of each pitcher PRIOR TO that game for
each game. (Ex. Even though Myers won the first game by 8 runs in his
first game, first row, his record prior to it was 0-0, the win
reflects in row 2, column A at 1-0, which is his record prior to the
start of his second game.)

2- Start over for each new pitcher name

End result for the new columns A and B

A B C D
WON LOST PITCHER TTL WON/LOST BY
0 0 Myers 8
1 0 Myers 5
2 0 Myers -3
2 1 Myers -1
0 0 Davis 2
1 0 Davis -6
0 0 Reeds 5
1 1 Reeds -2
1 2 Reeds -5
1 3 Reeds -1
0 0 Jones 4
1 0 Jones 2


Thank you,

DanO
 
D

Dan O'Shea

Sorry, correction on the 'formulated list' example, Reeds example,
here is the corrected list with the way it should look before and
after:

Myers 8
Myers 5
Myers -3
Myers -1
Davis 2
Davis -6
Reeds 5
Reeds -2
Reeds -5
Reeds -1
Jones 4
Jones 2


A B C D
WON LOST PITCHER TTL WON/LOST BY
0 0 Myers 8
1 0 Myers 5
2 0 Myers -3
2 1 Myers -1
0 0 Davis 2
1 0 Davis -6
0 0 Reeds 5
1 0 Reeds -2
1 1 Reeds -5
1 2 Reeds -1
0 0 Jones 4
1 0 Jones 2
 
J

JE McGimpsey

One way:

A2: =SUMPRODUCT(--($C$1:$C1=C2),--($D$1:$D1>0))
B2: =SUMPRODUCT(--($C$1:$C1=C2),--($D$1:$D1<0))

Copy down.

Note that your tally for Reeds is off.
 

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