Q: Count how many wins across tabs
I'm trying to create a table on my summary tab "Total Weekly Wins" that will count how many times someone has one each week and run that tally. The information is on weekly tabs Week 1 - 17. There is a Aux table in each weekly tab that labels the winner for that week. The Aux tables are now labeled identical.
I have an idea of some formula's but I'm not sure how to reference the name associated with the "Winner!" to add to the sheet, and then to add an Index formula so it checks each week. In the screen shot below Trisha wins so I wanted a 1 to go next to her name. And so on as the weeks go on.
iMac with Retina 5K display, null
Posted on Oct 19, 2016 7:51 PM
Hi Beh,
Accumulating summary data across a number of tables is always more difficult that extracting similar data from a single table, but is doable, especially what the several contributing tables are sequentially named.
I'd suggest a two step approach here:
- Collect the Winner! data from all of the auxiliary tables.
- Summarize the collected data.
The data to be collected in on row 5 of each of the auxiliary tables. Names of the participants are in row 1 of each auxiliary table, and are in the same order on each.
The auxiliary tables are organized with the names across the first row; your proposed "Total" table is organized with the names in the first column, which complicates matters. I would suggest using the Auxiliary table pattern for calculating the results, then transposing them to the pattern of the Total table.
Here's a sample set of Aux tables for 10 weeks (Aux1 is the table in my earlier example, Aux2 through 10 are copies of that table with random "W"inners inserted in the bottom row.
Summary:
All Aux tables contain the "W"inner results in row 5. (Aux1 also includes "n" in non-winner cells—a leftover from my early tests.)
Names of these tables are identical except for the number indicating the week to which the Aux is linked. This allows the Row number, or a number in column A of the Summary table to be used in composing an INDIRECT reference to row 5 of each table. The names of these tables are distinct within the document, so the Sheetname for each may be omitted from the range reference constructed with INDIRECT
Row 1: The names in Row 1 are direct transfers from the Row 1 cells of Aux1. Because they address a single table, INDIRECT is not necessary here:
Summary::B1: INDEX(Aux1::1:1,COLUMN())
Fill right to column F.
Rows 2 through 11: Each row collects the "W" and null string values (or "n"s in row 2) from one of the Aux tables:
Summary::B2: INDEX(INDIRECT("Aux"&$A2&"::A:F"),5,COLUMN())
Fill Right to column F
Fill down to row 11
Row 12: This is a Footer row. The formula in each column counts the number of "W" occurrences in its column.
Summary::B12: COUNTIF(B,"W")
Fill Right to column F.
Total Weekly Wins:
This table uses INDEX to copy the names in Row 1 of Summary into column 1 of TWW, and to copy the totals from Row 12 of Summary into column 2 of TWW.
Total Weekly Wins::A2: INDEX(summary::$1:$1,ROW())
Total Weekly Wins::B2: INDEX(summary::$12:$12,ROW())
Fill each down its column as many rows as there are names across Row 1 of Summary.
Regards,
Barry
Posted on Oct 20, 2016 2:36 PM



