PC Review


Reply
Thread Tools Rate Thread

Calculating total number of days

 
 
mac56er
Guest
Posts: n/a
 
      27th Jun 2008
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?
 
Reply With Quote
 
 
 
 
Storm
Guest
Posts: n/a
 
      27th Jun 2008
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)))

"mac56er" wrote:

> 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?

 
Reply With Quote
 
Roger Govier
Guest
Posts: n/a
 
      27th Jun 2008
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)

--
Regards
Roger Govier

"mac56er" <(E-Mail Removed)> wrote in message
news:19F9A31C-46F9-433A-8AA3-(E-Mail Removed)...
> 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?


 
Reply With Quote
 
mac56er
Guest
Posts: n/a
 
      27th Jun 2008
Roger,

Thanks! It worked.

Van Matthews

"Roger Govier" wrote:

> 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)
>
> --
> Regards
> Roger Govier
>
> "mac56er" <(E-Mail Removed)> wrote in message
> news:19F9A31C-46F9-433A-8AA3-(E-Mail Removed)...
> > 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?

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating total number of days in rolling year Suede Microsoft Excel Worksheet Functions 1 1st Dec 2009 02:46 AM
Calculating total days minus overlapp jasonjrowe@gmail.com Microsoft Access Queries 4 16th Feb 2007 08:39 PM
Working with Dates: Calculating A Running Total for Days Held Mcasteel Microsoft Excel Programming 1 18th Nov 2004 07:09 PM
Working with Dates: Calculating A Running Total for Days Held Mcasteel Microsoft Excel Programming 2 17th Nov 2004 10:57 PM
Calculating total days from 2 dates xswoosh Microsoft Excel Programming 2 24th Nov 2003 07:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:56 AM.