Count Number Of Weekdays Per Month using Excel - 2481

If you like this content, please consider visiting the video on YouTube and subscribe to the MrExcel Channel to show your support!
This video has been published on Apr 14, 2022.
Ronak asks: How can I use Excel to find out how many weekedays per month for the whole year?

This video shows how to do it using SEQUENCE, TEXT and a quick pivot table in Excel.
maxresdefault.jpg


Transcript of the video:
How to count the number of weekdays per month?
Hey welcome back to the MrExcel Netcast, I am Bill Jelen.
Today, a great questions by Ronak.
He is trying to figure out how many weekdays there are in each month, let's say for the whole year.
So there's five Fridays, 5 Saturdays, 5 Sundays.
First thing, select the whole column where the dates are going to go and change that to long date.
So what we're going to do here is we're going to put the dates down the left hand side.
I'm going to create a SEQUENCE function, 365 rows, one column starting from DATE(2021,1,1).
So that's January 1st 2021.
That should generate for me the 365 days.
If it's a leap year, of course, use 366.
And then the two important functions over here we're going to ask for the TEXT of A2 in MMMM format.
That will spell out the month name for us.
And then the TEXT of A2 in DDDD format like that.
Double Click to copy that down.
All right, almost done.
Insert, Pivot table, Existing worksheet.
Right here - somewhere on a blank section of the worksheet.
On the left hand side we will put months that goes to the Rows area.
Across the top, we'll put Weekday that goes to the columns area.
And then I need to get a count in here.
I'll just take the date field and drag it to values and it will count.
So in January 5 Sundays, but only four Mondays, four Tuesdays, 4 Wednesdays.
Across the bottom, you can see there's 52 of each except 53, so you can see there's 53 Fridays, 52 of everything else.
Now if he would change the year, so we come up here and change from 2021 to 2022, there's a gotcha.
You got to be careful.
This is a pivot table.
It does not automatically recalculate how you have to come in here and on the PivotTable analyze tab, click refresh.
So you know, in 2022 there's 52 Fridays and 53 Saturdays.
Like that.
Great question from Ronak.
I appreciate him sending that in.
Check out my new book MrExcel 2022,Bboosting Excel - all kinds of great tips and tricks in there.
Click that i on the top right hand corner for more information about that.
Why I want to thank Ronak for sending that question and I want to thank you for stopping by.
We'll see you next time for another netcast from MrExcel.
If you like these videos, please, down below, Like, Subscribe, and Ring the bell.
Feel free to post any questions or comments down in the comments below.
 

Forum statistics

Threads
1,221,530
Messages
6,160,351
Members
451,639
Latest member
Kramb

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top