SOLVED

Limit length of spill formulas, without errors, but error with IFERROR :-)

Copper Contributor

I have a set of data that I would like to:
1) filter for particular data - easily accomplished using FILTER.

2) sort according to particular data - easily accomplished using SORT.

3) limit the returned values to just the top 10 results - easily accomplished using INDEX and SEQUENCE (see here, thanks @Peter Bartholomew)

4) prevent the #REF error populating the list when fewer than 10 results are available - in theory easily accomplished using IFERROR( step 3 results , "").

 

However...  IFERROR seems to treat strings longer than 255 characters as an error, but only, from what I can tell, in this very specific scenario.

 

Anyone have any ideas to perform step 4 without the use of IFERROR, or know why IFERROR is doing this?  And before it is suggested, yes, my data string has to be able to be up to 400 characters unfortunately.

2 Replies
best response confirmed by AeroSteve (Copper Contributor)
Solution

@AeroSteve Let's say the array you want to pick the top 10 (or fewer) from is in A1#, try this:

=INDEX(A1#,SEQUENCE(MIN(COUNTA(A1#),10)))
Ahh, that'll do it. Thanks Riny
1 best response

Accepted Solutions
best response confirmed by AeroSteve (Copper Contributor)
Solution

@AeroSteve Let's say the array you want to pick the top 10 (or fewer) from is in A1#, try this:

=INDEX(A1#,SEQUENCE(MIN(COUNTA(A1#),10)))

View solution in original post