# How do I use an array formula to get column data from a sheet based a checkbox?

I have 3 sheets.

The first one `Master` contains my source data.

In the other two sheets I'm trying to get columns A-C from the source data `Master!A:C` based on the state of the checkboxes in columns D or E:

• `Sheet2` uses the checkboxes in `Master!D:D`
• `Sheet3` uses the checkboxes in `Master!E:E`

# Example Tables

##### Master (source data)
A B C D E
1 Neither Neither Neither
2 Both Both Both
3 Sheet2 Sheet2 Sheet2
4 Sheet3 Sheet3 Sheet3
##### Sheet2
A                              B                              C
1 Both     * `Master!A2` Both     * `Master!B2` Both     * `Master!C2`
2 Sheet2  * `Master!A3` Sheet2  * `Master!B3` Sheet2  * `Master!C3`
##### Sheet3
A                              B                              C
1 Both     * `Master!A2` Both     * `Master!B2` Both     * `Master!C2`
2 Sheet3  * `Master!A4` Sheet3  * `Master!B4` Sheet3  * `Master!C4`

How can I use an array formula the return data from columns A-C in `Master` based on a checkbox in either column D or E?

Put this formula in cell `A2` on `Sheet2`:
``````=filter(Master!A2:C, Master!D2:D)
...and this formula in cell `A2` on `Sheet3`:
``````=filter(Master!A2:C, Master!E2:E)