Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 5
Default Distributing All Days Across Months by Chip Pearson

The formula below I have used in my worksheet is what I have copied
from Mr. Pearson's site http://www.cpearson.com/excel/distribdates.htm
(Many thanks to him and his great site), however it is based on the
Start and End date being 15-Jan-00 and 12-Jun-00 in Cel B17 and C17
respectively.

=MAX(0,(MIN($C17,DATE(YEAR(D$16),MONTH(D$16)+1,0))-MAX($B17,D$16)+1))

What would the formula be if I had several more intervals horizontally
as 09-Oct-00 and 23-Dec-00 in cell D17 and E17 and 12-Feb-01 and
06-Sep-01 in cell F17 and G17. Ofcourse the MONTHS (Jan-00,
Feb-00...Dec-00, Jan-01, Feb-01...Dec-01..) would then have to
probably start from H16 onwards. I am looking for a combined formula
considering all the intervals together. Currently I am adding the
above formula for each interval for example:

=MAX(0,(MIN($C17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($B17,H$16)+1))
+ MAX(0,(MIN($E17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($D17,H$16)+1))
+ MAX(0,(MIN($G17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($F17,H$16)+1))

In my actual spreadsheet I have 8 such Date intervals, the formula
really gets too big. Is this the only way for me or is there a better
way

Any help would be greatly appreciated

Regards
Edward
  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 2,253
Default Distributing All Days Across Months by Chip Pearson

Edward..

I've written an addin with a function timeITcool.
it will work with larger intervals.. AND arrays.

see my dl page,
be sure to dl both the example and the addin.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


(Edward S) wrote:

The formula below I have used in my worksheet is what I have copied
from Mr. Pearson's site
http://www.cpearson.com/excel/distribdates.htm
(Many thanks to him and his great site), however it is based on the
Start and End date being 15-Jan-00 and 12-Jun-00 in Cel B17 and C17
respectively.

=MAX(0,(MIN($C17,DATE(YEAR(D$16),MONTH(D$16)+1,0))-MAX($B17,D$16)+1))

What would the formula be if I had several more intervals horizontally
as 09-Oct-00 and 23-Dec-00 in cell D17 and E17 and 12-Feb-01 and
06-Sep-01 in cell F17 and G17. Ofcourse the MONTHS (Jan-00,
Feb-00...Dec-00, Jan-01, Feb-01...Dec-01..) would then have to
probably start from H16 onwards. I am looking for a combined formula
considering all the intervals together. Currently I am adding the
above formula for each interval for example:

=MAX(0,(MIN($C17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($B17,H$16)+1))
+ MAX(0,(MIN($E17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($D17,H$16)+1))
+ MAX(0,(MIN($G17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($F17,H$16)+1))

In my actual spreadsheet I have 8 such Date intervals, the formula
really gets too big. Is this the only way for me or is there a better
way

Any help would be greatly appreciated

Regards
Edward


  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 5
Default Distributing All Days Across Months by Chip Pearson

keepITcool wrote in message . ..
Edward..

I've written an addin with a function timeITcool.
it will work with larger intervals.. AND arrays.

see my dl page,
be sure to dl both the example and the addin.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


(Edward S) wrote:

The formula below I have used in my worksheet is what I have copied
from Mr. Pearson's site
http://www.cpearson.com/excel/distribdates.htm
(Many thanks to him and his great site), however it is based on the
Start and End date being 15-Jan-00 and 12-Jun-00 in Cel B17 and C17
respectively.

=MAX(0,(MIN($C17,DATE(YEAR(D$16),MONTH(D$16)+1,0))-MAX($B17,D$16)+1))

What would the formula be if I had several more intervals horizontally
as 09-Oct-00 and 23-Dec-00 in cell D17 and E17 and 12-Feb-01 and
06-Sep-01 in cell F17 and G17. Ofcourse the MONTHS (Jan-00,
Feb-00...Dec-00, Jan-01, Feb-01...Dec-01..) would then have to
probably start from H16 onwards. I am looking for a combined formula
considering all the intervals together. Currently I am adding the
above formula for each interval for example:

=MAX(0,(MIN($C17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($B17,H$16)+1))
+ MAX(0,(MIN($E17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($D17,H$16)+1))
+ MAX(0,(MIN($G17,DATE(YEAR(H$16),MONTH(H$16)+1,0))-MAX($F17,H$16)+1))

In my actual spreadsheet I have 8 such Date intervals, the formula
really gets too big. Is this the only way for me or is there a better
way

Any help would be greatly appreciated

Regards
Edward


Hi Many thanks for your help with the "Timeitcool" function. It
worked really well. I truly appreciate your good work. Sorry I could
not respond earlier, as my Internet connection was down

Many Thanks

Edward
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
Thank you Chip Pearson Michael Excel Discussion (Misc queries) 3 February 5th 05 08:35 PM
Distributing All Days Across Months by CPearson Edward S Excel Programming 0 July 3rd 04 09:01 AM
Chip Pearson Ricardo[_2_] Excel Programming 0 November 10th 03 07:51 PM
CHIP PEARSON - THANX bertieBassett Excel Programming 0 November 3rd 03 02:01 PM
Chip Pearson or someone Chip Pearson Excel Programming 3 September 18th 03 05:22 AM


All times are GMT +1. The time now is 06:25 PM.

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"