Calculating total number of days

M

mac56er

I need to calculate the total number of days for a project. The spreadsheet
is set up to calculate the number of days for each month and then sum the
total of days. However, I cannot figure out the formula to calculate when
the beginning and end date is the same. For example, the projects ends on 1
Jun 08. The total number of days for June needs to be 1. Also, if a month
has no dates, the result should be 0. Any suggestions?
 
S

Storm

Have you tried to nest the formula with an if statement? Where you would say
=if(a1=b1,1,if(isblank(b1),0,day(b1-a1)))
 
R

Roger Govier

Hi

In order to include the whole of the start day and the whole of the end day
in any calculation, you need to use
=enddate-startdate+1
With startdate in A1 and enddate in B1
Try
=IF(COUNT(A1:B1)<2,"",B1-A1+1)
 
M

mac56er

Roger,

Thanks! It worked.

Van Matthews

Roger Govier said:
Hi

In order to include the whole of the start day and the whole of the end day
in any calculation, you need to use
=enddate-startdate+1
With startdate in A1 and enddate in B1
Try
=IF(COUNT(A1:B1)<2,"",B1-A1+1)
 

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

Top