Help with a Baseball Stat Google Sheet

91 views
Skip to first unread message

Andrew Streit

unread,
May 6, 2026, 8:18:09 AM (3 days ago) May 6
to Google Apps Script Community
I keep all of my Strat-o-Matic baseball stats on a Google Sheet. This is a dice board game. I have 16 teams and have a bunch of stat categories for each team.  It is very time-consuming to manually put in each piece of data after each game.  I've created an individual game sheet where the data for each individual game matches the yearly data for each team.  What I want to do is to be able to play a game and input the data on a individual sheet that tracks the data for just that game.  Then I want it to automatically add the data to each team's master yearly data sheet.  And then when I clear the data on the individual game sheet, I want the data on the yearly sheet to stay the same.  Then each time I enter data into the individual game sheet, I want it to automatically always add to the yearly game sheet for each team in each stat category.  Is this even possible?  Below is a picture of what I'm thinking.  I do not understand Apps Scripts enough to do this.  I would need someone to do it for me.  I used Joe Jackson for example.  Can I get the runs to automatically go from his individual game and add to his yearly stats?  Then clear the data and reuse the individual game sheet, but have the new stats stay.  So Joe Jackson would now have 26 runs.  I would clear the data, and he would still have 26 runs.  Any help I could get would be greatly appreciated.  Screenshot 2026-05-06 at 8.01.54 AM.pngScreenshot 2026-05-06 at 8.03.40 AM.png

Michael O'Shaughnessy

unread,
May 6, 2026, 7:07:18 PM (2 days ago) May 6
to google-apps-sc...@googlegroups.com
Hi Andrew,

This is, for the most part, doable.  BUT you need to share some more info.

Is Joe Jackson a "team" or an individual player?
If individual player, does he belong to a "team"?
Do you have a master list of teams?
Do you want the "master team yearly data sheet" to be a completely separate sheet?  So there would be one for each team? OR do you want one spread sheet with a lot of tabs?
Will your individual game sheet have multiple rows?

I can see a basic set up like this:
One master yearl data sheet with a tab for each team.
Enter the individual game data on another sheet.
Run a script that will read the data and update the data on the correct tab of the master yearl sheet.

Give us some more info and we can see what we can do.

Thanks,
Michael

On Wed, May 6, 2026 at 8:18 AM Andrew Streit <ast...@warsawschools.org> wrote:
I keep all of my Strat-o-Matic baseball stats on a Google Sheet. This is a dice board game. I have 16 teams and have a bunch of stat categories for each team.  It is very time-consuming to manually put in each piece of data after each game.  I've created an individual game sheet where the data for each individual game matches the yearly data for each team.  What I want to do is to be able to play a game and input the data on a individual sheet that tracks the data for just that game.  Then I want it to automatically add the data to each team's master yearly data sheet.  And then when I clear the data on the individual game sheet, I want the data on the yearly sheet to stay the same.  Then each time I enter data into the individual game sheet, I want it to automatically always add to the yearly game sheet for each team in each stat category.  Is this even possible?  Below is a picture of what I'm thinking.  I do not understand Apps Scripts enough to do this.  I would need someone to do it for me.  I used Joe Jackson for example.  Can I get the runs to automatically go from his individual game and add to his yearly stats?  Then clear the data and reuse the individual game sheet, but have the new stats stay.  So Joe Jackson would now have 26 runs.  I would clear the data, and he would still have 26 runs.  Any help I could get would be greatly appreciated.  Screenshot 2026-05-06 at 8.01.54 AM.pngScreenshot 2026-05-06 at 8.03.40 AM.png

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/d1bcdd03-f837-48cf-a4d0-be4f78a6d721n%40googlegroups.com.

Andrew Streit

unread,
May 6, 2026, 8:20:34 PM (2 days ago) May 6
to Google Apps Script Community
Joe Jackson is a player on one of my teams.  I have each team listed on its own sheet.  I have 16 total teams.  I have everything on one sheet with a lot of tabs.  I don't care how it's done.  Whichever way works the easiest.  Is it possible for me to share my Google Sheet with you so you can see what it looks like?  Thank you so much!  I really appreciate any help I can get.

Andy

Keith Andersen

unread,
May 6, 2026, 8:25:14 PM (2 days ago) May 6
to google-apps-sc...@googlegroups.com
Yes ..share a Sheet.



My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

Andrew Streit

unread,
May 6, 2026, 8:28:22 PM (2 days ago) May 6
to Google Apps Script Community
I've never been on this forum before.  Is it ok to share the sheet here?

Keith Andersen

unread,
May 6, 2026, 8:30:07 PM (2 days ago) May 6
to google-apps-sc...@googlegroups.com
If I were you, I would make a copy of your sheet and then share it. That way you're not risking your only good pristine copy. 

Share the copy as view only.



My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

Andrew Streit

unread,
May 6, 2026, 8:31:40 PM (2 days ago) May 6
to Google Apps Script Community

Keith Andersen

unread,
May 6, 2026, 8:54:48 PM (2 days ago) May 6
to google-apps-sc...@googlegroups.com
So walk us through your process using real tab names so that we get a sense of what data needs to move, where and when.



My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

Andrew Streit

unread,
May 6, 2026, 9:03:01 PM (2 days ago) May 6
to Google Apps Script Community
I want the data I collect on the Game Score Sheet to be added to each individual team's main page.  For example, if I play the Yankees vs. the Red Sox and input the data on my Game Score Sheet, I want the data for the Yankees on the Game Score Sheet to automatically add to the data on the New York Yankees 2024 tab.  And the Red Sox data from the Game Score Sheet to automatically add to the 1946 Boston Red Sox tab.  I also want it to stay there when I clear the data from the Game Score Sheet.

Andrew Streit

unread,
May 6, 2026, 9:05:49 PM (2 days ago) May 6
to Google Apps Script Community
I don't know if I need to create a Game Score Sheet for each team.  For example, the Yankees would have their own Game Score Sheet, and The Red Sox would have their own Game Score Sheet.  Then when I play the two teams, I use their own individual Game Score Sheets to input the results into.

Michael O'Shaughnessy

unread,
May 7, 2026, 8:28:29 PM (yesterday) May 7
to google-apps-sc...@googlegroups.com
First, this is an impressive amount of stats!!!

Second, it looks like on your "Game Score Sheet" in columns AY to CB almost match the columns in you "team tabs" C to AC.  So is this what you want the "yellow" from the "Game Score Sheet" to be used to update the correct "yellow" columns in the team tabs?

If so, we can "massage" the columns so they are in the same order (not a "deal breaker" but it makes life a LOT easier).  The script would need to find the team name somewhere on the score sheet, it would then read all the player data in column AY to CB.  It would then find the right team tab, find the right player and use the score sheet data to update the data on the team tab in the correct column.

Are we getting closer to what you are looking for?

Keith Andersen

unread,
May 7, 2026, 11:08:51 PM (22 hours ago) May 7
to google-apps-sc...@googlegroups.com
Michael and Andrew
Given the amount of data in the disparate locations and calculations of the data, I don't think it's possible to totally remove manual entry. However, I do think it's possible to cut it down significantly. 

What I would suggest is that all of the columns be duplicated onto another sheet and then an app script that takes the game score data and simply puts it onto this sheet. Each game is put on the same sheet. So in the end it would have thousands of rows.  

A second sheet would have the unique names from all teams and next to that the related columns that need to be put into the team sheets. Calculate the aggregate for each name / column and pull this data into the team tab data.

One script toove Game Score data to ALL GAMES SCORE SHEET and then formulas to aggregate and tabulate and ultimately match to Team Sheets.

You would still have to manually move some data that concerns team stats... But I believe the individual team member stats could be handled in this way. Once all that is moved then you can delete the Game Score data and it would all remain within the Team Sheets.

Make sense?
Keith 


My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

Andrew Streit

unread,
5:45 AM (16 hours ago) 5:45 AM
to google-apps-sc...@googlegroups.com
This sounds like what I want to do.  Would you be willing to do it for me?  I would so appreciate it.  

Reply all
Reply to author
Forward
0 new messages