Trying To Access Tables And Stats From Baseball Reference

I currently have an Excel worksheet set up to take real-life baseball stats and convert them to ratings for MLB 10: The Show. Right now, I have to manually insert all of the stats I need by "hand" into the spreadsheet. However, I would like to change the way I insert stats. I want to have Excel read the name I type in, search the name on Baseball-Reference, and then pull the specific tables I need from the site and import them onto my spreadsheet. Anyway I can do this? I have Excel 2007. Thanks a bunch!

Free Excel Help Forum

- Ask any question about Excel and have it answered in no time.

Similar Excel Tutorials

Using Formulas with Tables in Excel
Easy way to reference data tables and make formulas within a data table. This allows you to create formulas that a ...
Create and Manage Tables in Excel
Here, I'll show you everything you need to know to get started using tables in Excel; how to create, edit, and man ...
Complex Structured References (Table Formulas) in Excel
How to use complex structured references, table formulas, in Excel. If you don't already understand how structured ...
Loop through All Worksheets in Excel using VBA and Macros
Ill show you how to loop through all of the worksheets in a workbook in Excel using VBA and Macros. This only take ...

Helpful Excel Macros

Basic Web Query in Excel - Import Data from the Web into Excel
- Import data from the web into Excel with this macro. This is a basic web query macro that will import data from any web
Hide Specific Comments in Excel - Comments Will Still Display on Hover
- Hide specific comments in Excel with this macro. Comments are still visible on hovering over the cell that contains the
Excel Macro to Save a Specific Worksheet as a New File
- This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its own new file. You will be a
Excel Macro that Searches Entire Workbook and Returns All Matches
- This is the ultimate Lookup Macro for Excel. It will search every worksheet in the workbook and return all of the mat
Save the Current Worksheet as a New Excel Workbook File
- This Excel Macro will save the currently visible/active worksheet (the one that you see when you run the macro) to a

Similar Topics

I downloaded a MS Excel spreadsheet for keeping track of our 8 year old Baseball Team's game and individual stats.

I question is how do I make a seperate area in the sheet that automatically keeps a running total of each kids, batting average, hits, runs, etc.?

I have the spreadsheet, but don't know how to attach it to this for anyone to see.

Any help would be appreciated.



I have a worksheet that pulls stats from baseball reference, and on one .iqy file, it takes tables 1,2 and 12 from the players 2010 splits. However, that page doesn't have fielding, so I need to create another .iqy that takes stats from the fielding page. How do I open up the second .iqy file and add it to the other I already have?

I am supporting our local high school in recording and tracking sports stats. Particularly, basketball and soccer. Does anyone know a source of Excel programs for logging individual game stats which can be summarized for the season? I am familiar with Execel and pivot tables, but thought I would see what exists befor creating my own.

Thanx in advance for your help!


Hey Everyone,

I have set up an Excel sheet to keep track of our softball stats. I have a separate worksheet for each week, I then have a worksheet that is a total for the entire season. What I am looking to do is on a new worksheet rank the players in descending order for the various stats. We have 13 players on the team.

I found some VBA code that would auto sort two columns but the columns had to have actual values in them not equations.

On my "total season" work sheet all of the cells are a sum or average of the 10 other worksheets.

On a new worksheet I would like to have say 8 tables (2 colums, name of player and specific stat) I would like these 8 tables to auto sort data from the "total season" worksheet in a descending order so when I enter the weekly stats it will update my "total season" worksheet and then automatically resort the 8 or so tables.

Total Season Worksheet (sum of 10 other worksheets)
Joe .500 .560 .400 2 3 2 1
Bill .300 .800 .460 1 2 2 4
Andy .800 1.000 .750 8 1 0 0

Worksheet with tables
Top Average
Andy .800
Joe .500
Bill .300

Top Slugging
Andy 1.000
Bill .800
Joe .560

and so on...

Any ideas on how to automatically sort data from another worksheet and the data on that worksheet is actually just equations summing data from other worksheets. Also the columns that need to be sorted are not side by side.

Any insight would be great.


I do color for a local High School Football on the radio. I am looking for a simple spreadsheet to track stats during the game. Any help would be appreciated.

Hi all,

Im having a bit of blank day and have been staring at my screen for quite a while trying to think of some way to do this without it being to messy.

Anyway I need to setup a spreadsheet which does the following.....

I have a list of 5 jobs which are done every hour during the working day and a need a stat for how many was done at each hour. There are 4 people who do these jobs.

I need stats for - totals for each job, each day by each person.
- Overal total for each job each day
- Running totals of all stats during the month

Any ideas of how to lay to this out? We currently have a seperate sheet each day of the month in monthly spreadsheets but they get quite messy and doesn't look to great. I just need something to get me started. What sheets to have and how best to do it...

Any help on this would be great, its hard to explain on forum but thought I would give it a shot...

thank you


Hi, I want to create a spreadsheet that will give the updated stats of all my players... I know a few things with vba, but i don't know where to start with this one... Anyone knows how to create such a thing if it is even possible... For the curious its for my hockey pool, I would like to be able to transfer the stats of my players from an internet website ( to my excel spreadsheet...

I'm coaching a team of youngsters, and would like to track individual stats
by game (1 worksheet per game) and totals for the season. The only problem I
have is that the batting order is going to change every game (league rule).
Player1 would be in row 1 one day and row 8 the next.

So I thought that I could use the name function for each player and each
stat. Something along the lines of, SUM(Player1 Hits) in the Season Total
sheet. But you can't use the same name across sheets, and obviously the above
formula wil not work. Any chance I can make this work? Thanks!!!!

Hi! First post here--found the forum by googling "Excel forums" and here we are!

I know basic Excel. I use it rarely so I usually have to investigate how to do various things when I need to, but typically have kept to basic sums, etc.

Here is what I'd like to do:

I have a high school girls volleyball team. I'd like to list their names in a column followed by jersey number. I'd then like to have columns headed by individual stats... serves, missed serves, kills, digs, dives, etc. Simple enough. I'd like to use a sheet per game, so if they play a three game match, I'd track stats for each game. (As I write this, perhaps I'll make a sheet per match, but three columns under each stat representing each game).

I would then like a sheet where totals and averages end up. I've never done any Excel stats/sums/percentages across multiple sheets. So lets say Sally has played in every game, I'd like a sheet where her stats automatically accumulate and possibly average (like percent missed serves).

Now. Would it be best to do this within a single file? Each sheet could either represent a match or a game? I'm planning on printing blank copies for my manager to pencil tally during the game and enter during practice.

Any help or advice would be appreciated. If a similar situation is already written up in a tutorial somewhere a link would be great. Thanks!

I am maintaining a spreadsheet of stats from a sports league, and want one worksheet to be specifically for tracking league leaders. All the teams' stats are stored on a "Teams" worksheet, and using the LARGE function (=LARGE((Teams!C4:C11,Teams!C23:C30,Teams!C42:C49,Teams!C61:C69,Teams!C81:C89),1)), I have created a top-10 list of players with the most goals scored with the results on a "Standings" worksheet. The problem is that the function returns the NUMBERS of goals the leaders have scored, but I also want the NAME of the associated player listed next to the number of goals scored. The player names are listed in the column directly to the left of the goals scored column (B for names, C for goals scored). Anyone know how to get Excel to pull this data and have it automatically update when changes are made to the "Teams" sheet?

I can post the spreadsheet if needed.
**EDIT** Attached a generic version of the spreadsheet...

Given myself the task of creating a spreadsheet to record the stats for my cricket club.
This is something I've actually been doing for a few seasons, where i have previously had a seperate document for each team, had a tab for each match and used vlookups to import the data into the yearly breakdown tab for that file.

As my excel skills have improved a lot through work lately I thought it was a good time to make some imrpovements and I now have one file, where the data is all entered into one sheet, and that is then pivoted into a 'batting stats' 'bowling stats' and 'fielding stats' sheet.
I used pivtos as they can be filtered very easily which allows me to filter the data according to season/team/competition/opposition/batting position etc.

One problem I am having is that the pivot table's are no good for calculating things like batting average and economy rate as I don't know how to, if its even possible, to enter columns into a pivot and am thus having to lookup the data from the pivot into a table at the side which then calculates things like batting averages / economy.

It would be much better if i could have a batting average column in my pivot, but I have no idea how to do this as to calculate batting average you have to combine other comlums from the pivot, rather than pivotting data from the data tab.

Any help would be appreciated.

I am creating a workbook to help myself stay organized in my fantasy baseball draft, and this is what I have so far in terms of how I am plotting it:

1) There will be 2 spreadsheets, the first sheet (Player Rankings) will list all the players by position. The second sheet (Draft Results) will list the players who have been drafted by the members of my fantasy baseball league.

2) The Draft Results sheet is where I want to be kind of fancy: The teams will each be on different columns, and what I want to do is when I type a player name, the player name will either disappear, or change color in the Player Rankings List. I thought of a VLOOKUP, but that doesn't work for my purposes.

Anyone have any ideas? Also, has anyone developed a sheet like mine already for the upcoming fantasy baseball season?

Thanks in advance for the feedback.

I am trying to provide our local high school an Excel workbook that will
allow them to track sports stats.... particularly for basketball and soccer.
Does anyone have a workbook that is set up to enter players, and schedules,
and to allow entered game data to be summarized?

Any help is greatly appreciated!

Rick Smith

Is there a formula that will convert time format from minutes and seconds to Hours, minutes and seconds. I have some stats from Crystal Reports that are in minutes and seconds format (i.e 01:02, 1 minute & 2 seconds). I paste this into excel and compare the times with other stats that are in hours, minutes & seconds format (i.e 00:01:02, 0 hrs, 1 minutes & 2 seconds). At the moment I am having to overtype the cell to convert it in to the hours minutes & second format but wondered if there was a forumula I could set up that would do this for me.

Ok everyone, a guy at work needed help with something so I said I will see what I can do.

Basically we work in a call center doing tech support so he gets a document with daily stats for each employee. Now what we are trying to do is pull the stats per person according to employee number. The thing is each computer by default has Excel Viewer, you cannot make changes to any excel file, just read from them. Now when you have the full Excel installed the code works fine. But when you don't you get cannot create activeX Object. Here is our code.



<script language="VBScript">

	Dim ExcelApp, ExcelWB
	Dim Cells
	Dim objNet
	Dim oracle
	Dim xc

set objNet = CreateObject("WScript.NetWork")
oracle = objNet.username
document.write("<table border=1 id=table1 bordercolorlight=#FFFFFF bordercolordark=#FFFFFF><tr><td bordercolorlight=#4985B6 bordercolordark=#4985B6 bgcolor=#FFFFFF><p align=center><font size=1 face=Verdana>Stats for: " & oracle & "</font></td></tr><tr><td bordercolorlight=#4985B6 bordercolordark=#4985B6><table border=0 id=table2>")
	set ExcelApp = createobject("Excel.Application")
	ExcelApp.visible = False
	set ExcelWB = ExcelApp.Workbooks.Open("C:\Documents and Settings\Matt\Desktop\Stats\dailystats.xls")
	Set Cells = ExcelApp.Worksheets(1).Cells
	Set ExcelApp = Nothing

Private Function getpos()
	for i = 1 to 340
		if oracle = TRIM(Cells(i,3).value) then
			xc = i
		end if
end function

Private Function printstats()
	for i = 1 to 43
		document.write("<tr><td  width=158><font face=Verdana size=1>" & rtrim(trim( Cells(10,i))) & "</font></td><td width=58><font face=Verdana size=1>" & rtrim( trim(Cells(xc,i))) & "</font></td></tr></div>")
end function


Now we tried using

set ExcelApp = createobject("Excel.Sheet")

And that failed miserably. Can anyone help us out?

I have never really used VBA and so am completely stuck at this problem. I need to create a macro which auto-populates a master worksheet from the individual user sheets in a shared workbook.

Sheet 1 is the master sheet "Team Stats". There will be an undetermined number of individual worksheets to accomodate new staff.

Each worksheet will be identical, using columns A-I with row 1 having the headings:

Date, Name, Reference, Value, Price, Age, Purchased?, Destination, Add. Products (the last 3 columns will have a drop-down list which will be used to enter data into the cell).

There will be a varying number of rows in each of the individual sheets.

If possible I would like the macro to run every time data is entered into one of the individual worksheets. If this is not then it would be fien to update every time the workbook is opened.

If anyone can help it would really cut down the time I spend collating these stats every day!

Hi Guys,

I wonder if you lot will be able to help me with a problem I have.

I have a spreadsheet uses a formula in each cell which has a directory in it, as it does count from another spreadsheet and matches with the count criteria on the main spreadsheet. Basically it looks something like this:

=SUMPRODUCT(--(directory name\[25-01-2011.xls]Sheet1'!$H$1:$H$6000="whatever search criteria it is"))

I have to create a new spreadsheet of data each day, and name it accordingly (I name it the date for the day it is refering to). I then make a copy of the previous days tab on the main spreadsheet, and do a find and replace on the filename and change it to the new filename in all the formulas.

Basically, I want to know if there is a way I could have a cell on the main spreadsheet where I can just write in the new filename (always named the date.xls), and all the formulas in the spreadsheet reference that call (as the directory is always the same, so it will only be the filename part that changes) in the formulas, and so will automatically update the stats.

Thanks in advance.

Hi folks,

I created three spreadsheets with pivot tables and macro's and tables in excel 2007. Then my computer crashed, so I has to re-install Windows and Excel.

The problem now is that if I insert a row anywhere in any of the spreadsheets, Excel either takes a really, really long time (three or four minutes) to insert the row, or it just crashes and I have to restart.

I can't understand what's causing the crash, I tried disabling macros, deleting certain tables, but it doesn't help. Is this a recognized problem? I even tried re-installing Excel - no good.

I have to insert rows from one spreadsheet to another so this is becoming a real issue, a five minute job is taking an hour when I include time to recover from crashes etc.

Thanks for your help,

Good morning,

Hopefully someone can help me out. I have an excel spreadsheet that, when opened pulls data from a database, and is formatted on the spreadsheet. In the middle of the columns of data I retrieve there are two columns that have formulas in it, that I put in manually.

I want to put those forumlas in one time and that's it, but when I close the spreadsheet it deletes all the information and when re-opened the formulas are gone.

The spreadsheet is a "public" sheet so that people in the office can see the progress and stats of transplants, the formula part is a very important.

Can anyone help me or tell me how to keep the forumlas in the spreadsheet?

Did that make sense? let me know if I can give you more information.


I am putting together a spreadsheet to record stats for my cricket club. My problem is when I am inputting the bowlers overs, if they have bowled an odd number of balls, I cannot find the right formula to add them up correctly.

For those who aren't into cricket. A bowler bowls an over of 6 balls, but in one game he may bowl 1 over, of six balls, and then only completes another over of, say 3 balls. The following week he does the same, but balls 4 balls in his 2nd over. Therefore, he has bowled 3 overs and 1 ball or as is commonly shown 3.1. My problem comes when the computer tries to add up 1.3 and 1.4! I get 2.7. I have tried separating the overs and balls, but still get the same problem when adding them together and dividing by 6!

I am sure there is a way to solve it, but I can't see it! CAN ANYONE HELP!

I have a rather large dataset in Excel and am using Pivot Tables to create cross tabulations with the data. I'd like to apply a weight to the Pivot Tables. In SPSS (or similar stats programs), weighting the table would be done by going to "weight cases", choosing the variable to use as a weight, and creating a cross-tabulation with the applied weight.

Is there an equivalent in Excel that would allow me to apply a weight variable to a Pivot Table? If not, what other options do I have to apply weights to individual cases to get a resulting weighted Pivot Table?


I'm doing baseball standings and I'm trying to get a formula for "Games Back". I have no problems with whole #'s, but when they are .5 games back is where I have the problem.

Thanks David

Hi Team,

I am an intermediate VBA programmer in Excel. I do have knowledge about access tables and queries and I do know that it is easier to import excel tables from Access using import function.
Is there any efficient way to append excel tables into existing access table with the same table format (considering that access and excel table is a mirror to each other) via VBA in excel on monthly or weekly basis?

Kindly mention the VBA Objects to be used(Tools/VBA Reference) in vb editor if required.

Regards and thanks in advance.


I have a spreadsheet that connects to an access database which in turn links to a server. Sometimes when i run these data imports with the screenupdating turned off i loose the sheet im viewing and all i can see is a blue/grey plain screen.

This is the same screen you would see if excel is opened but no worksheet is opened.

Is there anyway i can prevent this from happening as im trying to use excel to view stats on a display screen?

Hi all,

I am trying to build a report-like spreadsheet simply to convey key stats.

What would be ideal is if I could add a drop-down tree to hide/show sub data. I.e. when someone hits the little "+" on the left of a cell, a sub-dataset is displayed (and contracted upon another click).

Please see the attached sheet .. if that helps or not..

Hopefully I've posed the question coherently enough!

Thanks as always!