calculate days per year

  • Thread starter Thread starter 3307
  • Start date Start date
3

3307

hello,

I have a number of contracts with different start and end dates. i would
like to calculate the number of days in each contract which fall within 2008,
2009, 2010, and 2011 respectively. (i.e. a column with the days in 2008, a
column with the days in 2009, etc.).

can anyone help me with the formula please?

many thanks.
e.
 
=DATE(2008,12,31)-start_date

=DATE(2009,12,31)-start_date-year_2008_sum

=DATE(2010,12,31)-start_date-year_2008_sum-year_2009_sum

etc.


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Thank you Bob,
if I'm not mistaken your formula shows the number of days from the contract
start date to the end of a year.
I need to consider also the end date of the contract, i.e. when a contract
starts in 2007 and ends half way through 2009 i would want to see 365 days in
the 2008 column and 182 days in column 2009.

Can you help please?
thanks again.
 
Remiss of me, I should have considered that

=MIN(DATE(2008,12,31),end_date)-start_date

=MIN(DATE(2009,12,31),end_date)-start_date-year_2008_sum

etc.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
thank you, i will give it a try.

Bob Phillips said:
Remiss of me, I should have considered that

=MIN(DATE(2008,12,31),end_date)-start_date

=MIN(DATE(2009,12,31),end_date)-start_date-year_2008_sum

etc.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top