SOLVED

Need Formulas For Stats

Copper Contributor

I'm creating a stat tracker for my baseball league. I have set up multiple formulas already but there are a few I would love to know if are possible. 

For example...

if B3 is the Wins column, and C4 is Losses, is there a way for them to recognize which number is greater from the score submission columns (K3, L3 week one scores) then (M3, N3 week two scores) etc... and automatically increase by +1 in the wins or loss columns?

Also we have sportsmanship rating and each week a team submits a score out of 10 ie.(7/10)... This I have recorded in E3. Is there a way to have it automatically add the new number to the existing one entered? So... if the cell currently reads 20, i just select it and type 7, and it autosums to 27.

Everything else I have figured out already but any help would be appreciated. 

7 Replies
Your verbal description is somewhat helpful; you've even done a pretty good job. You've heard, I'm sure, that a picture is worth 1,000 words. Could you take that as a truism and attach an image of what your words describe. Better yet, a copy of the spreadsheet itself could be posted to GoogleSheets or OneDrive (or the like), making sure to grant access to others......


I think I did this correctly?

best response confirmed by Hans Vogelaar (MVP)
Solution

@Solon_Jagers 

I think I did this correctly?

 

Well, yes...but. You should take it down and post only a copy of the first sheet if you want to continue getting help. There's a sheet in there that contains real names and phone numbers; that should not have been posted.

 

That said, I'm attaching a spreadsheet [the one you shared is read-only, so I had to copy to my own computer]  that shows one way to accomplish what you're trying to do. It's probably not the most elegant solution, but it'll work (after you follow the pattern out for the remaining weeks). What you'll see is that I added a column for each week that simply (and automatically) notes whether it was. a win, loss, or draw. And then the formulas back at the far left, where you summarize, call on those "helper columns" rather than trying to determine win or loss AND add all in one fell swoop. As I said, probably not the most elegant, but then, I'd have approached the whole thing in a different way (which still may not have been the most elegant).

I also added some conditional formatting to highlight teams with winning or losing season records. So the final summary columns look like this.

mathetes_0-1651238354759.png

 

@Solon_Jagers 

 

Oh yes, the last part of your original question: 

Also we have sportsmanship rating and each week a team submits a score out of 10 ie.(7/10)... This I have recorded in E3. Is there a way to have it automatically add the new number to the existing one entered? So... if the cell currently reads 20, i just select it and type 7, and it autosums to 27.

 

I've always found it helps me keep my brain functioning when I do those autosums (especially when we're talking of max two-digit numbers) in the aforementioned brain. And I suspect it's a lot faster than any VBA routine or macro that otherwise would have to be written. An alternative, if you think it necessary to keep track of the individual weekly submissions, would be to actually keep in the cell a running total. So although the cell might be showing, say, 30, if you put your cursor on the cell, you could read =7+8+6+9...   Personally, I'd go with doing the math in my head and just entering the new total, overwriting whatever was there.

 

Have fun coaching!!

If you have access to 365 and LAMBDA...

Win column: =SUM(MAP(K3:AT3,LAMBDA(x,IF(AND(ISODD(COLUMN(x)),x>OFFSET(x,0,1)),1,0))))
Loss column: =SUM(MAP(K3:AT3,LAMBDA(x,IF(AND(ISEVEN(COLUMN(x)),x>OFFSET(x,0,-1)),1,0))))
Draw column: =SUM(MAP(K3:AT3,LAMBDA(x,IF(AND(ISODD(COLUMN(x)),x=OFFSET(x,0,1),x<>""),1,0))))
Thank you very much for your help, formula, and time. I do appreciate as it will do perfectly.
Thanks again
You are very welcome
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@Solon_Jagers 

I think I did this correctly?

 

Well, yes...but. You should take it down and post only a copy of the first sheet if you want to continue getting help. There's a sheet in there that contains real names and phone numbers; that should not have been posted.

 

That said, I'm attaching a spreadsheet [the one you shared is read-only, so I had to copy to my own computer]  that shows one way to accomplish what you're trying to do. It's probably not the most elegant solution, but it'll work (after you follow the pattern out for the remaining weeks). What you'll see is that I added a column for each week that simply (and automatically) notes whether it was. a win, loss, or draw. And then the formulas back at the far left, where you summarize, call on those "helper columns" rather than trying to determine win or loss AND add all in one fell swoop. As I said, probably not the most elegant, but then, I'd have approached the whole thing in a different way (which still may not have been the most elegant).

I also added some conditional formatting to highlight teams with winning or losing season records. So the final summary columns look like this.

mathetes_0-1651238354759.png

 

View solution in original post