Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count weekdays in a month 1

Status
Not open for further replies.

jh3016

Programmer
Jun 6, 2003
148
US
Is there a formula that would count weekdays in the month? For example, I would like to count how many weekdays are in January 2004. The answer should be 22. I have a large amount of months that I need to do this computation for and it is time consuming to go to the calendar and count the weekdays.

Any help would be appreciated.

Thanks.
 
Check out NETWORKDAYS in help. Note that this function is an add-in.
 
With Month and year in A1, eg Jan-04, try the following:-

=NETWORKDAYS(DATE(YEAR(A1),MONTH(A1),1),DATE(YEAR(A1),MONTH(A1)+1,0))

or

=NETWORKDAYS(DATE(YEAR(A1),MONTH(A1),1),EOMONTH(A1,0))

or

=NETWORKDAYS(EOMONTH(A1,-1)+1,EOMONTH(A1,0))

Regards
Ken....................

----------------------------------------------------------------------------
Attitude - A little thing that makes a BIG difference
----------------------------------------------------------------------------
 
Forgot to say, you will need the Analysis Toolpak enabled in Tools / Addins. ;-)

Regards
Ken...............

----------------------------------------------------------------------------
Attitude - A little thing that makes a BIG difference
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top