next-upcoming-date21In a previous article Upcoming date I presented a solution that bolded dates within seven days from today using conditional formatting.

In this article the excel array formula searches for the the next upcoming date.

Column A contains date values and column B example data. See picture to the right.

Formula in cell E2: =INDEX($A$2:$A$8, MATCH(MIN($A$2:$A$8-$E$1), $A$2:$A$8-$E$1, 0)) + Ctrl + Shift + Enter. See picture below.

To customize the above formula to your excel sheet, you need to edit bolded ranges:

=INDEX($A$2:$A$8, MATCH(MIN($A$2:$A$8-$E$1), $A$2:$A$8-$E$1, 0))

Formula in cell E3: =INDEX($B$2:$B$8, MATCH(MIN($A$2:$A$8-$E$1), $A$2:$A$8-$E$1, 0)) + Ctrl + Shift + Enter


Download excel sample file for this tutorial.
(Excel 97-2003 Workbook *.xls)

Functions in this article:

MATCH(lookup_value;lookup_array; [match_type])
Returns the relative position of an item in an array that matches a specified value

Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

Returns the smallest number in a set of values. Ignores logical values and text