Count Public Holidays that falls on a Saturday

cloud2828

New Member
Joined
Jul 16, 2019
Messages
43
I have a list of public holidays and I would like to know how I could count the ones that fall on a satuday.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Assuming that what you have are valid dates, then an easy way would be to insert a column next to each that returns the weekday of each one, i.e.
Code:
=WEEKDAY(A1)
(and copy down for all rows)

Then use the COUNTIF function to count all the records where that value is 7, i.e.
Code:
=COUNTIF(B1:B20,7)
 
Last edited:
Upvote 0
Alternative solution - assuming that a list of your public holidays is in cells A1:A10:

Code:
=SUMPRODUCT(--(WEEKDAY($A$1:$A$10,2)=7))

(adjusted after Fluff's comment)
 
Last edited:
Upvote 0
Maybe
=SUMPRODUCT(--(WEEKDAY(A2:A32,2)=7))
Funny, I tried something like that initially, and it didn't appear to work. So I tried again, and now it does. I must have had a typo initially.

However, there is one issue with your formula. If you choose "2" for your second argument, then Saturday returns 6, not 7.
That argument is optional, and if you leave it off and go with the default, Saturday is 7.

So it should be:
=SUMPRODUCT(--(WEEKDAY(A2:A32,2)=6))
or simply:
=SUMPRODUCT(--(WEEKDAY(A2:A32)=7))
 
Last edited:
Upvote 0
You're quite right Joe
For some reason I was reading it as counting Sundays, not Saturdays.
So either
=SUMPRODUCT(--(WEEKDAY(A2:A32,2)=6))
or
=SUMPRODUCT(--(WEEKDAY(A2:A32)=7))
 
Upvote 0
Thank you all for the responses! I shall try these.

Edit: Thank you all, I saw where my problem lied, I was trying to use COUNTIF.
 
Last edited:
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,109
Members
448,548
Latest member
harryls

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