Create a second table with subset data

Hi,


Using formula's how do I get a table of data that is a subset of another table? For example, I have a list of weekdays in one table which also has a column that records if the market was closed on a specific day. In the second table I would like to have formula that brings through only the rows (the dates) where the market is open.


I am aware something similar can be done using "Organise and Filters" but I would like to achieve this with formula's for a number of reasons.


Any solutions greatly appreciated :-).




Posted on Sep 25, 2021 10:23 PM

Reply
3 replies

Sep 25, 2021 11:51 PM in response to Kiwisurfer

This can be done with MATCH, INDEX, and a formula that creates an index column numbering the 'open' days.


Table 1, on the left is based on your two column table showing Mondat to Friday dates in column A and empty cells on days the market is open and text on the weekday dates on which it is closed.in column B.

A third column has been added to hold a list of numbers indicating the 'open' dates. This 'index' list is created by the formula below, entered in C2, and filled down as far as needed.


Table 1::C2: IF(B2="",COUNTIF(B$1:B2,""),"")


As the formula is filled down the column, the B$1B2 range expands to include all rows from 1 to the row containing the current copy of the formula.


The formula shown below the table is entered in cell B2 of Table 2. Row()-1 sets a search value used by MATCH to locate the row with each date to be copied to this table. The location is handed to INDEX, which retrieves the value on the same row of column A as the index marker in column C.


Other columns on Table 2 would use the same INDEX MATCH formula with the same index column ans the column A reference changed to match the column of Table 1 containing the data to be transferred.


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.

Create a second table with subset data

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