ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find Date Between? (https://www.excelbanter.com/excel-worksheet-functions/450889-find-date-between.html)

[email protected]

Find Date Between?
 
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

Basically, 6/15/2015 is greater than 02/07/2015.

I tried Offset and Indirect. I can't seem to get this to work. As you can assume, I can't just do a simple comparison like this:
=IF(AND(A2$B$1,A2<$c$1),a2, FALSE)

It needs to be a little more intelligent than that.

Any ideas, anyone?

Claus Busch

Find Date Between?
 
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

Howard Silcock

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


All times are GMT +1. The time now is 09:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com