Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

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.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Display cell contents if adjacent cell is true

Have a column of text values. In the column to the left of it, is a corresponding column of check marks. On another sheet, I have a column with an equivalent number of cells.


I'm trying to show on the second sheet, the values of any cells which have a corresponding checkmark.


Ultimately, if there are 'gaps' in the column of values, say, only odd values are checked, I'd like to display the values in the second sheet without the gaps, so that the data 'closes up' and looks tidy.


Example of what I'm trying to accomplish:


Posted on Jan 6, 2022 8:23 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 7, 2022 12:47 AM

Here's a method combining a pair of formulas and a filter on the second table.


Table 1 has one column added to contain an index of the checkmarked rows, calculated by the formula shown below the table. The new column, C, may be hidden.

The formula is entered in C2, then filled down to the end of that column.

Cell C1 may be empty, or may contain a zero.


Table 2 may be placed on the same sheet of on a second sheet. Here, for convenience, it is placed beside the first table.


IF(ROW()−1>MAX(Table 1::C),"^&*",
 INDEX(Table 1::B,MATCH(ROW()−1,Table 1::C,0)))


The formula is entered as shown in cell A2 of Table 2, then filled down to the end of the column.

The INDEX/MATCH part (in bold) uses the index numbers in column C of Table 1 to retrieve the values from those rows of column B and place then in consecutive cells here.

The part of the formula in normal weight type is a switch that 'turns off' the bold part when all index values have been found, and places an arbitrary three character text string in the remaining cells of Table 2.


If you're happy with 'empty' cells showing, replace the "^&*" in the formula with "".


The ^&* string is there as a flag to a filter rule set to show only the cells that do not contain this three character string.


Hee are both tables, with the filter rule shown beside them, but not yet activated.


Clicking the checkox to the right of "Filters" checks the box and turns the filter on, with this result:


Regards,

Barry

6 replies
Question marked as Top-ranking reply

Jan 7, 2022 12:47 AM in response to Skriddo

Here's a method combining a pair of formulas and a filter on the second table.


Table 1 has one column added to contain an index of the checkmarked rows, calculated by the formula shown below the table. The new column, C, may be hidden.

The formula is entered in C2, then filled down to the end of that column.

Cell C1 may be empty, or may contain a zero.


Table 2 may be placed on the same sheet of on a second sheet. Here, for convenience, it is placed beside the first table.


IF(ROW()−1>MAX(Table 1::C),"^&*",
 INDEX(Table 1::B,MATCH(ROW()−1,Table 1::C,0)))


The formula is entered as shown in cell A2 of Table 2, then filled down to the end of the column.

The INDEX/MATCH part (in bold) uses the index numbers in column C of Table 1 to retrieve the values from those rows of column B and place then in consecutive cells here.

The part of the formula in normal weight type is a switch that 'turns off' the bold part when all index values have been found, and places an arbitrary three character text string in the remaining cells of Table 2.


If you're happy with 'empty' cells showing, replace the "^&*" in the formula with "".


The ^&* string is there as a flag to a filter rule set to show only the cells that do not contain this three character string.


Hee are both tables, with the filter rule shown beside them, but not yet activated.


Clicking the checkox to the right of "Filters" checks the box and turns the filter on, with this result:


Regards,

Barry

Jan 6, 2022 9:52 PM in response to Skriddo

Is there a reason you must have the results in a different table? (Note that "sheets" in Numbers have a blank canvas on which you place objects, including tables, so I think you mean table instead of sheet).


A filter is much the fastest way to do what you describe.





If you need the results in a separate table then just select the visible cells in the filtered table, command-c to copy, click once in a cell in an existing destination table (create one first if you don't have one already), and command-v to paste.


When you are finished and want to see the entire table again you can "turn off" the filter in Organize > Filter .



SG

Jan 6, 2022 11:27 PM in response to Skriddo

Thanks for taking a look. The other table is on a different sheet.


The filters idea seems like it might work, but I'm trying to do this using a formula and the checkboxes as triggers for the selected information. The table which has both the checkboxes and values holds all of the available values, while the table on the different sheet holds the selected values. What I cannot figure out is how to make the values "close up" so there are no gaps between cells.


The tables are separate because the results will be printable, whereas the selection sheet(s) will not. Actually of course you can but it won't look as nice as the finalized sheet.

Jan 7, 2022 11:57 PM in response to Skriddo

Skriddo wrote:

The tables are separate because the results will be printable, whereas the selection sheet(s) will not.


In that case a quick-copy paste word well. As described above:


"If you need the results in a separate table then just select the visible cells in the filtered table, command-c to copy, click once in a cell in an existing destination table (create one first if you don't have one already), and command-v to paste."


That only takes a second or so. Unless you have to do this often (every minute or so) then the filter approach is much faster and easier than setting up extra columns and entering formulas.


SG

Display cell contents if adjacent cell is true

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