How to copy entire rows of data matching one criteria.

I have a main table set up like this:


  • Column 1: Student Name
  • Column 2: Sport (e.g., Swimming, Football, Tennis, etc.)
  • Column 3: Score they received in each sport


Now, I want to create separate tables on different sheets for each sport. For example, one table for Tennis that shows all student names and their scores in Tennis. So in total, I need around 6 tables—one for each of the 6 sports.


I would like these tables to update automatically whenever I add a new student and their score in the main table.


Could you please tell me what formula I should use to create these different tables?


I’m not very confident with formulas, , so please explain each step clearly, including what formula to use and where to place it (which row and column).


Thanks so much for your help!

MacBook Pro 14″

Posted on Jul 20, 2025 11:34 AM

Reply
10 replies

Jul 25, 2025 6:32 PM in response to pheonix2610

If the word "football" is in cell A1 then the formula would be


=FILTER(Sheet 1::Table 1::A:C,Sheet 1::Table 1::B=A$1)


If it is somewhere other than cell A1 then use that other cell in the formula.


Or you could change the table name to Football and the formula would be

=FILTER(Sheet 1::Table 1::A:C,Sheet 1::Table 1::B=TEXTBEFORE(REFERENCE.NAME(A$1,1),"::"))


Jul 26, 2025 2:50 PM in response to Badunit

I read your response in 255022338 . As this thread has been closed I am writing to you here.


My region is Austria (Österreich) and thus all the names of Number's functions are in German. The German equivalent of the OFFSET function is BEREICH.VERSCHIEBEN which uses ";" as parameter seperator. Thus your formula G2 =SUM(OFFSET(G2,−1,0,1,1))−D2+E2 had to be changed to BEREICH.VERSCHIEBEN(G2;−1;0;1;1) but that doesn't work because (G2;−1;0;1;1) refers to "Balance" in your example. If you would be so kind and verify if your original formula is working in the current version of Numbers - and if not - let me know what function would work now, I would be very grateful.

Jul 27, 2025 6:00 PM in response to Badunit

Thanks. It worked.


But, for all these formulas to work, looks like I need to have the rows in advance. Rows are not getting created when new items are added in the main table.


For example, my football sheet has 10 Empty rows and when I add upto 10 items in main sheet it works but when an 11th item about "Football" is added in the main sheet, the football sheet gets an error. If I increase the row to 11 manually in football sheet, it works. Is there any way to make the sheet automatically add those rows.

Jul 20, 2025 2:32 PM in response to pheonix2610

Assuming you have Numbers 14.4 with all the new array functions (like FILTER):


First screenshot is the data table you described.



There are no formulas in the data sheet (none required for doing what you requested), just the data.


Next is the sheet for "football"



To make this sheet and table,

Add a new sheet

Rename it to Football

Row 1 is typed in headers. No formulas.

cell A2 formula =FILTER(Sheet 1::Table 1::A:C,Sheet 1::Table 1::B=TEXTBEFORE(REFERENCE.NAME(A$1,2),"::"))

This formula will automatically spill into all the other rows where it is needed


To make the other sheets,

Duplicate the sheet for Football

Rename the new sheet as Soccer

Repeat for the other sports


The formula uses the sheet name to filter the data.


If you don't want to see the sport name as column B in the filtered tables, you can hide that column.


Breakdown of the formula:

REFERENCE.NAME(A$1,2) gets a string representation of the cell address. Result is "Football::Table 1::A1"

TEXTBEFORE returns the part of the string before the first "::". Result is "Football"

FILTER returns the values from Table 1::A:C where Table 1::B = "Football"


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.

How to copy entire rows of data matching one criteria.

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