Sorry to be thick here but is the data relating to a particular row.
Just trying to work out if something starts in 2004 and ended in 2015
where the end date goes ...into the 2015 spreadsheet ?? Also would it
be on the same line as the 2004 start date ??
A sample of data would make things easier
VBA Noob
Thanks for sticking with it...your not being thick - it's my explanations.
Yes, each pair of dates is pertaining to a row.
If you please, set this up: -
A2 contains a task start date 1st July 2006
B2 contains a task end date 3rd November 2009
C1..L1 are the year labels 2006 to 2015
C2..L2 is where the magic formula needs to be.
The grand total DAYS360 is 1202 for these two dates, but the formula needs
to put the correct days in each year (Obviously 2007 and 2008 are full years
so 360 will appear there.
A3 contains a task start date 12th December 2007
B3 contains a task end date of 3rd March 2015
The DAYS360 total is 2601, but again I need to know the spread - 2008 to
2014 being full years so 360 will be in those.
A4 has a start of 10th October 2006
B4 has the end date 24th December 2006
DAYS360 tot. is 74 and obviously it's all in 2006
The same formula must be used in all three examples, so it can be ready to
take any start date and any end date......up to 2,500 rows deep.
I hope that makes more sense?
----------------------------------------------------------------------
> Sorry to be thick here but is the data relating to a particular row.
> Just trying to work out if something starts in 2004 and ended in 2015
[quoted text clipped - 4 lines]
>
> VBA Noob
VBA Noob - 18 Jun 2006 22:54 GMT
Hi Pete,
This formula assumes Sheet 1 has the start and end dates
=MAX(0,(MIN(Sheet1!$B2,DATE(2006,12,31))-MAX(Sheet1!$A2,DATE(2006,1,1))+1))
If it's not what your after try the attached link for ideas
http://www.cpearson.com/excel/distribdates.htm
VBA Noob

Signature
VBA Noob
Pete Dray - 18 Jun 2006 23:31 GMT
VBA Noob, that is perfect!
It doesn't work on the "days360", but it doesn't need to for what I actually
want it for.
Many, many thanks.
--------------------------------------------------------------------
> Hi Pete,
>
[quoted text clipped - 7 lines]
>
> VBA Noob
VBA Noob - 18 Jun 2006 23:49 GMT
Phew,
I just realised the 360 days think and was having a think how to adapt
the formula. I've had a few drinks so didn't get very far.
I'm sure one of the experts on here would have cracked it
VBA Noob

Signature
VBA Noob