Data selection on Numbers in iMac
[Re-Titled By Moderator]
iMac 24″, macOS 15.0
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
[Re-Titled By Moderator]
iMac 24″, macOS 15.0
Here's an approach with two "counter" columns in Table 1 (Base) that can be hidden if wanted.
In D2, filled right to E2 and down:
=IF(COUNTIFS($B$1:$B2,D$1,$C$1:$C2,"<>"&"")>MAX(D$1:D1),MAX(D$1:D1)+1,"")
This increments by 1 when the conditions are met. Otherwise, it leaves the cell "blank."
It's important to get the $ anchors right as shown so that the "expanding ranges" work correctly.
This can easily be modified if 20 and 25 are the only values to consider in column C.
In A2 of the L1 table, filled down:
=XLOOKUP(ROW()−1,Table 1::D,Table 1::A,"")
In A2 of the M2 table, filled down:
=XLOOKUP(ROW()−1,Table 1::E,Table 1::A,"")
More on functions here:
SG
There are a few ways to accomplish this task. Here is one that keeps all the work in the other tables, except for a column of row numbers needed in the first table.
Add a new column to Table 1. The formula in that column is =ROW(). When everything is set up and working you can hide this column.
Table 2::B1 needs a 1 in it
Table 2::A2 =IF(B2=0,"",INDEX(Table 1::A,B2))
Table 2::B2 =IF(B1=0,0,MINIFS(Table 1::D,Table 1::B,A$1,Table 1::C,REGEX("20|25"),Table 1::D,">"&B1))
Fill down with both formulas to complete the columns
Hide column B after it is all set up and working.
The formula in Table 2::B looks for a row in Table 1 where column B is "L1", column C is "20" or "25" (this is a text comparison, not numeric), and the row number in column D is greater than the most recent row number returned. It returns the row number from column D. MINIFS returns 0 if a match is not found (which also indicates there are no more rows to find). If the number in the row above is 0 (no matches found), the formula quits looking for matches, otherwise it would start over again and repeat the list.
Thank you.
I listened to your advice trying not to complicate the file, but I still made the two tables I need to print the lists.
In the example I did as a test I put two tables the first on the left has 80 rows, which are filled in from the registration sheet with the formula you recommended last time, of which half hidden the second on the right has 40
The numbering of both tables is made with the RIGA function
In the second table with the IF function, as seen in the screenshot, the data of the hidden lines of table 1 are reported
In this way I got what I wanted in a simple and dynamic way.
In making the lists with the help of the formulas you recommended I find myself having another need.
When the list is particularly long, can I divide it into two tables?
For example, I start with a table of up to 50 subscribers and in a second table enter members from 51 onwards.
How can I do?
My recommendation is to not do that. While you might be able to use UNION.RANGES to join the two tables in the formulas, you will have to edit the formulas whenever you add a new table. Other methods would require either a lot of formulas to consolidate your multiple tables into one large table so you can use the data or would require some lengthy lookup formulas to search every table (basically saying "if table 1 is out of names then search Table 2, if Table 2 is out of names then search Table 3" and so on and you would have to edit the formulas each time to include new tables)
It is better to have all the data in one table and, if you want to view smaller sections of it (like rows 2-51 or 52-101), you can use filters on the big table or you can manually hide/show rows in the big table. Or you can set up smaller tables that pull data from the big table using formulas.
Thanks to both of you.
Your tips for dynamically compiling event registration lists work wonderfully.
Data selection on Numbers in iMac