Referencing multiple tables in Numbers

I have a main table and multiple tables full of data.


On the main table I want to use a countif function in the Games column to pull the result of 2 for the name Joe Smith


I haven't been able to make it work unless using multiple functions ie (countif ('Game1::A1:A3,A1))+(countif('Game 2::A1:A3,A1). I don't want to do this with 17 tables and counting.


Is there a way to use countif across multiple tables?


Main

NameGames

Joe Smith


Game 1

NameScore
Joe Smith300
Jane Doe200


Game 2

Name

Score

Joe Smith250
Jimmy Brown280

MacBook Pro TouchBar and Touch ID, macOS High Sierra (10.13.2)

Posted on Dec 14, 2017 8:39 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 14, 2017 10:47 PM

Moose013 wrote:


I don't want to do this with 17 tables and counting.


Since the data in each table is the same structure you might consider consolidating them into one, then extracting summaries you need with simple, short formulas, something like this.


User uploaded file



In the Results table you have an added column to show the game number. You can filter on that when you want to show the results of just one game.


User uploaded file


If you set up and enter your data this way, then the formulas become short and simple:


In my example:


In B2, filled down:


= SUMIF(Results::B,A2,Results::C)


In C2, filled down:


=COUNTIF(Results::B,A2)


In D2, filled down:


=B2/C2


That's much more manageable than having multiple tables and then trying pull things together with huge long formulas.


SG

4 replies
Question marked as Top-ranking reply

Dec 14, 2017 10:47 PM in response to Moose013

Moose013 wrote:


I don't want to do this with 17 tables and counting.


Since the data in each table is the same structure you might consider consolidating them into one, then extracting summaries you need with simple, short formulas, something like this.


User uploaded file



In the Results table you have an added column to show the game number. You can filter on that when you want to show the results of just one game.


User uploaded file


If you set up and enter your data this way, then the formulas become short and simple:


In my example:


In B2, filled down:


= SUMIF(Results::B,A2,Results::C)


In C2, filled down:


=COUNTIF(Results::B,A2)


In D2, filled down:


=B2/C2


That's much more manageable than having multiple tables and then trying pull things together with huge long formulas.


SG

Dec 14, 2017 10:32 PM in response to Moose013

Hi Moose,


You have discovered the folly of recording the data on several tables, then attempting to gather data from all those to summarize.


Fortunately, the UNION.RANGES, introduced in Numbers 5, can save you some of the work.

User uploaded file

The image shows COUNTIF as it appears in B2 of the table Main.

UNION.RANGES is used to combine the ranges, each consisting of all of column A in one of the five data tables into a single range of cells in which to count the occurrences of the name in A2 of the Main table.


Main::B2: COUNTIF(UNION.RANGES(FALSE,Table 1::A,Table 2::A,Table 3::A,Table 4::A,Table 5::A),A2)


The formula is filled down to the last row in Main containing a name.


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Referencing multiple tables in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.