LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default Adding a series of tables

Hello, all. I am an experienced programmer but a rookie Excel user.
I wonder if someone can help me with a simple problem?

I am the scorekeeper for my son's Little League team and I want
to keep track of the team's statistics. I have two tables per game,
showing the hitting and pitching statistics in the usual way, e.g.,

AB R H RBI
Fred 5 2 3 2

and so on. I have my spreadsheet set up with each game in
a separate worksheet.

What I want is a "season total" table that sums up the statistics
for all of the games. Since the players' names will appear in
different orders from game to game, my first shot at this was
to use a series of VLOOKUPs, e.g.,

=VLOOKUP($A1, Batting1, COLUMN(), FALSE)+VLOOKUP($A1, Batting2,
COLUMN(), FALSE)

where Batting1 and Batting2 are the tables of batting information
for games 1 and 2. Since not every player appears in every game,
this actually has to be =IF(ISERROR(VLOOKUP(...)), 0, VLOOKUP(...))
+...
in case a name is missing from one of the tables.

Copying this formula across my "season total" table gives me
the right answer, but as the number of games increases, the
formula gets increasingly long and clumsy, so I am looking for
a better way. What I want in effect is a loop:

total = 0
for each game {
if (player appears in table) {
total += statistic for this game
}
}

I could do this easily enough with a VB function, but I wanted to
avoid
that, since I am afraid that it will be a nuisance when I send the
spreadsheet
around to other people.

I thought that I could do something with an array expression, but I
couldn't
get it to work. I tried

={SUM(VLOOKUP(...,INDIRECT(List_of_tables),...))

where List_of_tables is a region containing the names of
the individual tables (Batting1, Batting2, ..), but it didn't give
me the right answer.

How would an experienced Excel user solve this problem?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding tables in a query J Gui Excel Discussion (Misc queries) 0 February 15th 08 03:49 AM
adding data to an exisitng series greco Charts and Charting in Excel 1 February 5th 08 09:46 PM
Data Tables Series Label Glyn[_2_] Charts and Charting in Excel 1 October 15th 07 02:30 PM
Adding a second series to an existing chart Angela Charts and Charting in Excel 4 February 8th 07 05:46 PM
adding data series automatically mbk6784 Charts and Charting in Excel 0 June 9th 06 04:56 AM


All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"