Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / November 2005

Tip: Looking for answers? Try searching our database.

is there a standard formula for this?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
keith - 21 Nov 2005 20:23 GMT
Please can anyone point me to the best way to do this, I expect it's a
common problem and my head is spinning trying to work out the simple formula
needed:

I have a sheet with  rows  showing tasks in  a project, each task has
columns showing a start & a finish date.  Other columns show  months.
I need to show how many days of each task occur  in each month, so I can
bill for time spent each month.

eg, as in a gantt bar chart:
task        start        finish                Jan    Feb    March
design    1 jan        31 Jan            31        0        0
develop   1 jan       20 Feb           31        20     0
etc.

It must be something like "startofmonth-taskstart..........etc" but there
seem to be 6 different combinations of how a task overlaps the month you
want, and I'm looking for a simple calculation, not 6 nested Ifs!

Thanks if anyone can help.
Biff - 22 Nov 2005 03:48 GMT
Hi!

Try this:

Column B = start dates (must be true Excel dates)
Column C = finish dates (must be true Excel dates)

E1:P1 = Jan, Feb, Mar etc

Formula in E2:

=IF(MAX($B2,DATE(YEAR($B2),MONTH($B2)+COLUMNS($B:B)-1,1))<$C2,MIN(DATE(YEAR($B2),MONTH($B2)+COLUMNS($B:B),0),$C2)-MAX($B2,DATE(YEAR($B2),MONTH($B2)+COLUMNS($B:B)-1,1))+1,0)

Copy across then down as needed.

Note: only works properly if the dates are in the same year!

Biff

> Please can anyone point me to the best way to do this, I expect it's a
> common problem and my head is spinning trying to work out the simple
[quoted text clipped - 16 lines]
>
> Thanks if anyone can help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.