How can I get nth column of a dynamic range in Excel?

I get a filtered range by =FILTER(A1:Z1000, $P1:$P1000="T1")

This function will return a range of several rows and 26 columns.

But I only want the A, D, Z columns.

Other new dynamic functions such as SORT will also return a dynamic range.

Is there any function can select specific column of a range?


Solution 1:

You can use the INDEX function with arrays for the row/column arguments to return the relevant columns.

eg:

=FILTER(INDEX($A$1:$Z$1000,SEQUENCE(ROWS($A$1:$Z$1000)),{1,4,26}), $P$1:$P$1000="T1")

EDIT: At the request of @MátéJuhász, below is a screenshot with an example of a similar formula and the output, on a smaller scale

=FILTER(INDEX($A$1:$N$7,SEQUENCE(ROWS($A$1:$N$7)),{1,4,10}), $K$1:$K$7="A")

enter image description here