I would like to have a simple program done that will spit out an excel spreadsheet that will calculate the Hits+runs+Errors in a baseball game based on stats that i feed it. For example the first thing i do is enter in the number of at bats that a team has vs a particular pitcher then i divide that number by 35. If the number of at bats is > then 35 i will divide the result by the total of hits and rbi, if the number of at bats is < then 35 i divide 35 by that number and multiply the result by the total hits and rbi. I also want an option for me to Feed it the Batting Averages. In order for the program to display the team as a winning pick the batting average has to be **.250 or >.** When the batting average is entered for the teams playing against each other the higher average is the winning pick.
Example 1 (Team A 55 at bats 55 /35 = 1.57 so then 10 hits + 7 runs /1.57 = 10.82) + (the result for team b 40 at bats 40 / 35 =1.14 so then 15 hits + 4 run / 1.14 = 16.66 )
Total = 27.48 H+R+E.
Example 2 (Team A 25 at bats 35 / 25 = 1.4 so then 10 hits + 7 runs * 1.4 = 23.8) + (the result for team b 12 at bats 35 / 12 =2.91 so then 8 hits + 1 run * 2.91 = 26.19 )
Total = 49.99
I would like it to display like this in excel sheet see below
Team Team Predicted Winning Team **( based on Batting Average.)**
Texas Angels Texas
23.8 26.19
Total H+R+E = 49.99
So These are the questions that i would like the program to ask me so that it can put all of this information in an excel spreadsheet.
Questions Below
1st Team Name: Texas
1st Team At Bats: 55
1st Team Hits + Runs: 10
1st Team Batting Average: .275
2nd Team Name: Angels
2nd Team at Bats:125
2nd Team Hits + Runs: 15
2nd Teams Batting Average: .265