Forum Discussion
Filter selected columns in a specific order
Hi All,
If my source data contains 6 columns:
A B C D E F
and I want to FILTER 3 columns with the order being
A F D (i.e. not in the same sequence as the source)
It does seem to work.
I am suing the formula
FILTER(Source, Countif(HeaderRow,SourceHeaderRow))
where SourceHeaderRow is ABCDEF
and Header row is AFD
In other words, it seems to me that the FIltered data must be in the same sequence as the source data.
Can this be done.
Please note that I do not have access to CHOOSECOLUMN function.
I hope this makes sense!
thank you in anticipation.
Peter
2 Replies
- IlirUIron Contributor
Hi peteryac60,
If you have access to the SEQUENCE and ROWS functions, try this formula:
=INDEX(A1:F10, SEQUENCE(ROWS(A1:F10)), {1,6,4})Note: Adjust the range in the formula according to your needs.
HTH
IlirU
- peteryac60Iron Contributor
Hi
Many thanks for your input - I am trying to get it to work but no luck so far.
I think this is because I do not understand how Sequence evaluates the curly brackets i.e. {1,6,4}
As I understand it the second parameter in Sequence is COLUMNS - not sure how it evaluates {1,6,4}
Can you advise please?
thank you!😀