Sunline
Well-known Member
- Joined
- Oct 6, 2007
- Messages
- 697
Hello all , I am wanting to get a function that can find the first break of 40 days or more .
Col F contains dates as does cols CH too DK .
Asumming col F is todays date , col DK will have the closest most previous date , col DJ
would have the second closest most previous date to col F and so on , col CH would
contain the oldest most previous date to col F , otherwords runs backwards .
There will never be blank cells in between dates .
If cols CH to DK are blank then result answer is always 1 .
I want to find the first break of 40 days or more from col F looking at the dates going
backwards from cols DK to CH .
Once a break of 40 days or more is found count all the dates up to col DK and add 1 for today .
Example : Todays date is 21/6/12_______ 1/1/12-----1/4/12-----1/5/12-----1/6/12-----7/6/12
There is a break of 91 days between 1/1/12 and 1/4/12 , so answer is 5 , this includes 1/4/12
Another example sheet below .
Thanks .
Col F contains dates as does cols CH too DK .
Asumming col F is todays date , col DK will have the closest most previous date , col DJ
would have the second closest most previous date to col F and so on , col CH would
contain the oldest most previous date to col F , otherwords runs backwards .
There will never be blank cells in between dates .
If cols CH to DK are blank then result answer is always 1 .
I want to find the first break of 40 days or more from col F looking at the dates going
backwards from cols DK to CH .
Once a break of 40 days or more is found count all the dates up to col DK and add 1 for today .
Example : Todays date is 21/6/12_______ 1/1/12-----1/4/12-----1/5/12-----1/6/12-----7/6/12
There is a break of 91 days between 1/1/12 and 1/4/12 , so answer is 5 , this includes 1/4/12
Another example sheet below .
Thanks .
Excel Workbook | |||||||||
---|---|---|---|---|---|---|---|---|---|
E | DE | DF | DG | DH | DI | GM | |||
1 | Date | Date5 | Date4 | Date3 | Date2 | Date1 | Result | ||
2 | 8/06/2012 | 30/12/2011 | 12/01/2012 | 28/01/2012 | 4/02/2012 | 3/06/2012 | 2 | ||
3 | 8/06/2012 | 14/01/2012 | 15/04/2012 | 21/04/2012 | 5/05/2012 | 4 | |||
4 | 8/06/2012 | 1 | |||||||
5 | 8/06/2012 | 8/03/2012 | 16/03/2012 | 22/03/2012 | 29/03/2012 | 1/06/2012 | 2 | ||
6 | 8/06/2012 | 1 | |||||||
Sheet1 |