# Weekdays calculation

#### DJPants

##### New Member
Hello,
Does anyone know how to calculate the number of weekdays in a given month and year?

eg October 2006 = 22
December 2006 = 21 etc.

Many thanks,

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

#### DiscoPistol

##### Active Member
Hi,

Code:
``=NETWORKDAYS(39356,39385)``

Will give you the number of days.

The numbers represent Serial Date in Excel (Which I think is the number of days since 1/1/1900)

Hope that helps

DP

#### arthurbr

##### Well-known Member
The networkdays function will need installation of the analysis toolpak add-in I think

HTH

#### DiscoPistol

##### Active Member
I should mention that you can also add Holidays (Bank Hols etc) using this Formula

##### Well-known Member
NETWORKDAYS Returns the number of whole workdays between two dates.
NETWORKDAYS(start_date,end_date,holidays)
NETWORKDAYS("10/01/1998","12/01/1998","11/26/1998")
Or
NETWORKDAYS(start_date,end_date)

#### barry houdini

##### MrExcel MVP
If you have the 1st day of the month, e.g. 1-OCT-2006, in A1 then, using Analysis ToolPak functions

=NETWORKDAYS(A1,EOMONTH(A1,0))

or without Analysis ToolPak

=SUM(INT((WEEKDAY(A1-{2,3,4,5,6})+DAY(DATE(YEAR(A1),MONTH(A1)+1,-1)))/7))

Replies
2
Views
397
Replies
3
Views
480
Replies
3
Views
295
Replies
10
Views
567
Replies
4
Views
269

1,181,658
Messages
5,931,271
Members
436,785
Latest member
KingGideon

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back