Returning closest prior date

C

Chuck

I need a formula which will return the closest prior date to today's date
from a list. For example, from the following list and today being Oct-22-04,

Row 1: 7/1/04
Row 2: 10/1/04
Row 3: 1/1/05

I want to return 10/1/04. Please advise. Thanks.
 
D

Daniel.M

Hi Frank,
=VLOOKUP(B1,A1:A100,1,TRUE)
where B1 stores the date to search for

This assumes theDates are in order (sorted).

For a solution with out of order theDates, the following ARRAY
(Ctrl-Shift-Enter) formula:

=MAX(IF(A1:A100<B1,A1:A100))

or directly:

=MAX(IF(A1:A100<TODAY(),A1:A100))

Regards,

Daniel M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top