Thread: Counting weeks
View Single Post
  #7   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On 18 Aug 2005 17:30:54 -0700, "Blue Hornet" wrote:

Okay, this doesn't seem too difficult.

Your A1 date is "any start date" and your B1 date is "any subsequent
Friday", correct? And you want to know how many full weeks and partial
weeks (counted as full) occur between A1 and B1.

Then the formula in C1 should be:
=CEILING( DATEDIF( A1, B1, "d") / 7, 1)

This will:
Determine the days between A1 and B1 (DATEDIF),
Divide that by 7 (to get "weeks" and "partial weeks" as a decimal),
Round that upward (if necessary) to the nearest whole number (CEILING).

Chris


One question that occurs to me is how to handle the situation where two partial
weeks are rented. For example, if someone starts renting on Friday 5 Aug 2005
and stops on Monday 8 Aug 2005, does that count as one week? or two weeks?


--ron