count days in a date range

C

cp

I am trying to count the number of days within a given
date range but leave out saturday's and Sunday's. Is
there a way to do this? Using the function Days360 seems
to be the right path, and counts all the days between the
range, but I am not sure how to customize from there, if
it is even possible.

cp
 
F

Frank Kabel

Hi
if your dates are in a and B1 use
=NETWORKDAYS(A1,B1,list_of_holidays)

Note: the Analysis Toolpak Add-in has to be installed for this
 
C

cp

Do you know where I can download the toolpak? I use Excel
2000 on a Windows XP operating system. I did find a site
on Microsoft at:
http://www.microsoft.com/downloads/details.aspx?
FamilyID=01902294-9e3f-487f-b7b0-
e310fe2d5362&DisplayLang=en

but was not positive it was what you were refering to.

Also, will this function be able to calculate a date
range and leave out just Sunday, vs. the entire weekend?

cp
 
F

Frank Kabel

Hi
it's included on your installation CDs. Goto 'Tools - addin' and check
this Add-in
 
C

cp

Thank you. Also, will this function be able to calculate
a date range and leave out just Sunday, vs. the entire
weekend?
 
F

Frank Kabel

Hi
for this you may use the following array formula (entered with
CTRL+sHIFT+ENTER):
=B1-A1-SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)+1)))=1,1,0))
 
O

OM

Why don't you count ALL the days (easy enough), divide by 7 to get weeks,
and take 2 x [Number of weeks] off the total days ? You question further on
about only Sundays - take 1 x [Number of weeks] off. If you're worried about
part weeks, check first to see what day the period starts with, and work
from there.

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top