Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Calculating total number of days

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Calculating total number of days

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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Calculating total number of days

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" wrote in message
...
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?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Calculating total number of days

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculating number of days between first day to last day, inclusiv Damian Excel Worksheet Functions 1 November 23rd 07 06:30 PM
Calculating Number of days from one date to another Renz09 Excel Discussion (Misc queries) 2 May 3rd 06 10:18 AM
Calculating number of hours between two days NMM Excel Worksheet Functions 1 October 21st 05 11:36 AM
Calculating the number of days worked Curtis Excel Worksheet Functions 4 August 5th 05 10:16 PM
Calculating number of days Carlos Excel Worksheet Functions 3 March 1st 05 08:23 PM


All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"