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.
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.
How about
=XMATCH(E2, E4:E18, -1)
and
=XMATCH(E2, E4:E18, 1)
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more