Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to return a cell by searching for a date with specific criteria

I’m trying to find and return a cell from column E by searching for a cell in column A with the most recent date that has passed including today.

For example from the picture below, I’m looking for a formula that would return E18($16,550) if the date is March 25th, 2024. Once the date becomes April 5th, 2024, the formula should start returning E19($17250).

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Is this possible?

>Solution :

Several options. Here’s one using MAXIFS:

=INDEX(E:E,XMATCH(MAXIFS(A:A,A:A,"<="&TODAY()),A:A))

To verify this will return the expected results for future dates, consider:
enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading