Automating a table from data in another table in Numbers for Mac

I can't do a web search for this because the terminology I want to use already describes OTHER types of spreadsheet actions, so I had to draw it out. I have a table of people and they all get a label, I can use sort/filter/copy/paste type of actions to group them by label then add them onto another table, but is there a formula to automatically do this so when the first table is updated, the second table also is updated? I realize I might be asking for more than what Numbers can actually do and if so, that's ok.

Posted on May 1, 2023 5:55 PM

Reply
Question marked as Top-ranking reply

Posted on May 19, 2023 7:44 AM

This question looks very much like this post.


Here's a one-formula solution that uses two relatively new functions in Numbers:





The formula in A2, filled down, is:


=REGEX.EXTRACT(TEXTJOIN("~",1,Table 1::A:B),"(\w+)~"&A$1&"\b",ROW(cell)−1,1)


You can wrap the formula in IFERROR to hide the red triangles, but the triangles can be useful. For example you can click one and get this information:




Note how the message shows the regular expression that is constructed by the formula. This is used to try to find a match on any "word" characters followed by ~East. The match is sought in the results of the TEXTJOIN, which Numbers holds in memory. If the results of TEXTJOIN were displayed in a cell they would be:


Albert~East~Bob~West~Colby~West~Devon~North~Earl~East~Frank~West~George~East~Harold~East~John~West


The REGEX.EXTRACT parameters are like this:




If your region uses , as the decimal separator then your formula would be:


=REGEX.EXTRACT(TEXTJOIN("~";1;Table 1::A:B);"(\w+)~"&A$1&"\b";ROW(cell)−1;1)


SG

Similar questions

2 replies
Question marked as Top-ranking reply

May 19, 2023 7:44 AM in response to cvghbjikmnkoplmlpm

This question looks very much like this post.


Here's a one-formula solution that uses two relatively new functions in Numbers:





The formula in A2, filled down, is:


=REGEX.EXTRACT(TEXTJOIN("~",1,Table 1::A:B),"(\w+)~"&A$1&"\b",ROW(cell)−1,1)


You can wrap the formula in IFERROR to hide the red triangles, but the triangles can be useful. For example you can click one and get this information:




Note how the message shows the regular expression that is constructed by the formula. This is used to try to find a match on any "word" characters followed by ~East. The match is sought in the results of the TEXTJOIN, which Numbers holds in memory. If the results of TEXTJOIN were displayed in a cell they would be:


Albert~East~Bob~West~Colby~West~Devon~North~Earl~East~Frank~West~George~East~Harold~East~John~West


The REGEX.EXTRACT parameters are like this:




If your region uses , as the decimal separator then your formula would be:


=REGEX.EXTRACT(TEXTJOIN("~";1;Table 1::A:B);"(\w+)~"&A$1&"\b";ROW(cell)−1;1)


SG

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.

Automating a table from data in another table in Numbers for Mac

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