pevious date searching

mort1703

Active Member
Joined
Sep 13, 2008
Messages
266
Hi

I have a row of 52 dates, is their a way of searching through the range of dates to give me the closest date to today for example

01/04/2015 01/02/2015 01/03/2015

for arguments sake the columns can be E1:G1 for simplicity.

Today Date is 01/06/2015 - I would like it search the above dates and return 01/04/2015.

The field searching is H1 for the example

Any help would be appreciated
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
If your list of dates are all prior to "today", then you could use a simple: =MAX(E7:G7)

However, if your list of dates includes dates both prior and after "today", then try this CSE formula (confirm with Ctrl+Shift+Enter, do not just hit the Enter key - if confirmed correctly, then curly brackets { } will surround the formula in the formula bar):
Code:
=INDEX(E1:G1,0,MATCH(MIN(ABS(E1:G1-TODAY())),ABS(E1:G1-TODAY()),0))
If it happens that a date before and after today are both the closest with the same number of days from today, then the formula will bring whichever date is listed 1st.
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top