# COUNTIF and weekdays

#### Shinano

##### Board Regular
I have a range A1:A31 listing the weekdays of a month. I need to count weekdays in this range in one cell and weekend days in another cell.

I am trying to come up with a formular using COUNTIF, but for some reason I can not get it right.

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

#### MarkAndrews

##### Well-known Member
Multiple countif's

=countif(a:a, "Monday")

=countif(a:a, "Tuesday")etc

#### barry houdini

##### MrExcel MVP
If A1:A31 contain dates then you can count weekdays with

=SUMPRODUCT(--(WEEKDAY(A1:A31,2)<6),--(A1:A31<>""))

and the weekends with

=SUMPRODUCT(--(WEEKDAY(A1:A31,2)>=6),--(A1:A31<>""))

#### Joe4

Barry,

Is the European version of Excel different than the US version? On our version, the Weekday function returns 1 for Sunday and 7 for Saturday, so the formulas you posted would need some tweaking to work.

EDIT: Barry pointed out to me the second argument of the WEEKDAY fucnion, which accounts for this.

#### Shinano

##### Board Regular
Thank you for the swift reply. I really appreciate it.

On more question, Barry. What are the: -- ?

I am sorry, but it has been some time since I have used Excel and my skills are pretty rusty.

Again, thanks a lot.

#### Domenic

##### MrExcel MVP
Have a look here...

Hope this helps!

Replies
1
Views
138
Replies
2
Views
898
Replies
6
Views
300
Replies
3
Views
382
Replies
11
Views
387

1,171,060
Messages
5,873,533
Members
432,982
Latest member
meepio

### 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