May 25 2022 07:15 AM
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.
May 25 2022 07:47 AM
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)))
May 26 2022 04:01 AM
May 25 2022 07:47 AM
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)))