Forum Discussion
felipeprevente
Sep 29, 2022Copper Contributor
FILTER Function using a cell reference as a Boolean for the Include parameter
Hello Experts, I've created a concatenated field to retrieve the boolean expression to be used in a FILTER function as below: A1 = "{"&B1&","&C1&","&"}" OR {1,0,1} A2 = 1 So, my formula i...
- Sep 29, 2022
I usually just include a field above my table containing TRUE/FALSE to indicate which columns to include:
Patrick2788
Sep 29, 2022Silver Contributor
You might use:
=FILTER(CHOOSE({1,3},D1:D10,0,F1:F10),A1:A10=1)
or even better, if you have CHOOSECOLS:
=CHOOSECOLS(FILTER(D1:F10,A1:A10=1),1,3)
- felipepreventeSep 29, 2022Copper Contributor
Patrick2788 , can this be dynamic? I mean, these 1,3 parameters in CHOOSECOLS.
Thanks for your reply!
- Patrick2788Sep 29, 2022Silver ContributorYes, it can. It all depends on your goal. If you have a sample workbook, a formula can be drawn up. You'd likely get a few solutions from the community here.