# Re: How do Count a the number of times a date range appears within a date range!?

*From*: "Micah" <hirschman@xxxxxxxxx>*Date*: 27 Sep 2006 13:31:44 -0700

You may get farther by using the NETWORKDAYS() function. The third

(optional) parameter in that function allows you to specify a range.

In that range, you have all the dates that are EXCLUDED from the "work

calendar." If you defined in that range the list of dates from

01DEC-05JAN, then maybe that would help. However, these dates need

years as well, so you'd have to be careful that as years go by in your

analysis, that your defined non-work days kept up. But you could

define those dates pretty easily by using the DATE() formula, which

would reference a base year, and then it would auto-update. Anyway,

give that some thought.

Micah

leelondon wrote:

I'm stumped, I have no real idea on how to do this so any help much

appreciated!

I have a start date (no year ie, 1st December)

and an end date (again no year say 5th Jan),

And a date range, eg 11th May 2001 to 1 January 2006

for info late:

1st Dec to 5th Jan = 35 days

How do i get a count of the number of 1st Decemebers to 5th Januarys in

that date range

for example

1st December 2001 to 5th January 2002 is 1st

1st December 2002 to 5th January 2003 is 2nd

1st December 2003 to 5th January 2004 is 3rd

1st December 2004 to 5th January 2005 is 4th

1st December 2005 to 1th January 2006 is 4.8857 4+(31/35)

So there are 4.8857 1st Dec - 5th Januarys! But how do i get a formula

or script to do this, preferable a formula as i need to use the result

in another formula

If it helps what i am ultimately trying to do is calculate an average

weekly sales figure for many different products. but exclude the 5

week period beginning 1st Dec.

Existing formumal is

=Prod1Sales/(DAYS360(Prod1LaunchDate,ReportingDate)/7)

=Prod1Sales/((DAYS360(Prod1LaunchDate,ReportingDate)/7)-NoDecJans*35)

Where NoDecJan is the formula i cant work out for the number of Dec-Jan

periods, and the 35 is the 35days in the period.

Have i over complicated this is there a simple way?

Any help much appreciated.

.

**References**:

- Prev by Date:
**Re: How do Count a the number of times a date range appears within a date range!?** - Next by Date:
**Re: Copy above row data into blank fields below** - Previous by thread:
**Re: How do Count a the number of times a date range appears within a date range!?** - Next by thread:
**re:How do Count a the number of times a date range appears with** - Index(es):