Forum Discussion
JonasNovy
Aug 15, 2023Copper Contributor
Match on cyclic data ascending and descending back
Hi I'm this weird problem occured to me and I'm curious, why is this happening and if there is any way how to solve it. I have cyclic data, i.g. it goes from 0 to 2 and back to 0 and I would like...
- Aug 15, 2023Non-exact matches require the entire searched column to be sorted in ascending or descending order. Your data isn't sorted and hence you cannot do a non-exact match on all of the data
SergeiBaklan
Aug 28, 2023Diamond Contributor
JonasNovy
Aug 29, 2023Copper Contributor
I'm sorry, I'm not sure if I understand correctly. Could you please explain what you mean?
- SergeiBaklanAug 29, 2023Diamond Contributor
Misunderstood. If return both ascending and descending parts like
it could be like
=LET( nMAx, XMATCH(MAX(range), range), part, LAMBDA(list, FILTER(list, (list>=start)*(list<=end))), ascending, INDEX(range, 1):INDEX(range, nMAx), descending, INDEX(range, nMAx):INDEX(range, COUNTA(range)), VSTACK( "ascending", part(ascending), "descending", part(descending) ) )