View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
StephenT StephenT is offline
external usenet poster
 
Posts: 19
Default Spreading date range across days in weeks (advanced)

Hello

This particular problem has been causing me some consternation, and I was
wondering if anyone has already solved this problem or has a creative
solution


I have a date range, and I would like to convert that into how many days in
each week correspond to that range.


Example
Consider a range of an employees working dates. Lets say I have two input
fields: Start date (A3) and end date (B3), and want to be able to count the
number of days in each week C3: F3. Consider March of 2010, so Week 1
commences on 01/03/2010, Week 2 commences on 08/03/2010, etc. The starting
date of each week is in C1:F1

A3 and B3 are inputs, the formula is required for C3:F3. They work weekends,
so ignore the working day effect.


A B C D
E F

1 01/03/2010
08/03/2010 15/03/2010 22/03/2010
2 Start Date End Date Week1 Week2
Week3 Week4
3 05/03/2010 17/03/2010 3 {days in week) 7 {days in week} 3
{days in week} 0 {days in week}

As you can see, in this input range there is 3 days in Week 1 (5th to 7th
inc.) and 7 days in Week 2(8th to 14th), 3 days in

Please, no macros. Thanks in advance