A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
next greater
=MATCH(MINIFS(E4:E18,E4:E18,">"&E2),E4:E18)
next smaller
=MATCH(MAXIFS(E4:E18,E4:E18,"<"&F2),E4:E18)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'd like to get the row positions of two dates, or the position of next greater for min date
and next smaller for max date ;
The greater is fine but my dates are in ascending order so the -1 argument does not work
is there a way around this? I've usually had a complete list if dates so an exact match was ok.
I tried using sort which works for numbers ;
MATCH(H3,SORT(E4:E9,,-1),1) sort descending and then look for lesser that even though you want greater, but this failed when tried with the dates, any ideas
Richard.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Answer accepted by question author
How about
=XMATCH(E2, E4:E18, -1)
and
=XMATCH(E2, E4:E18, 1)
Thanks for introducing me to Minifs, not used it before, will experiment.
RD
Thanks, I always forget that x match and lookups don't need data sorted
RD