Forum Discussion
chastain1337
Dec 10, 2019Copper Contributor
Limiting the length of results from Dynamic / Spill Arrays
I am trying to figure out a way to limit the number of results returned from a dynamic array such as =UNIQUE or =FILTER. So for example, say I want to only want to return the first 10 unique values f...
- Dec 10, 2019
= INDEX( UNIQUE(ColumnA), SEQUENCE(10) )
would return 10 values and
= INDEX( UNIQUE(ColumnA), SEQUENCE(1,10) )
would transpose the result array.
PeterBartholomew1
Jan 13, 2021Silver Contributor
I don't use direct cell referencing so this will probably look strange.
= LET(
distinct0, UNIQUE(ColumnA),
distinct1, FILTER(distinct0, distinct0<>""),
N, COUNTA(distinct1),
k, SEQUENCE(MIN(N, 10)),
INDEX( distinct1, k ) )
What was the result of the other query that Sergei noted?
- SergeiBaklanJan 13, 2021Diamond Contributor
PeterBartholomew1 , I found the thread Help limiting length results of results from Filter Formula without #REF! - Microsoft Tech Community