View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Howard Silcock Howard Silcock is offline
external usenet poster
 
Posts: 16
Default Find Date Between?

On Thursday, 21 May 2015 05:01:53 UTC+10, Claus Busch wrote:
Hi Ryan,

Am Wed, 20 May 2015 11:50:27 -0700 (PDT) schrieb :

Hello experts. I have an array of dates, like this:
08/07/2013
02/07/2014
08/07/2014
02/07/2015
08/07/2015
02/07/2016
08/07/2016
02/07/2017
08/07/2017

I know a transaction will happen on this date:
6/15/2015

I want to find the NEXT date after that transaction date. So, I want to find this date:
08/07/2015


your date array in column A, the due date in C1.
Sort your data in A ascending and try:
=INDEX(A:A,MATCH(C1,A1:A9,1)+1)


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


Here's an alternative solution, using an array formula:
=MIN(IF($A$1:$A$9$C$1, $A$1:$A$9))
(Hold down Ctrl+Shift when you enter this, to make it an array formula.)

Probably Claus's solution is better (because you don't need the array), but for the above you don't need the dates to be sorted. In both cases you get the answer 01/00/00 if there is no date in the list later than C1.

Howard