# Countif Weekday Array between multiple Dates

##### New Member
Hello,

I need to be able to create a formula in the DAY cells below that tally the number of MONDAYs, TUESDAYs, and WEDNESDAYs within the Searchable Cells according to the Date Range specified. I have attempted "=SUM(N(WEEKDAY(F4:F536)=2))" to start but I cannot figure out how to get it to focus its search between date ranges.

Searchable Cells Date Range
A
 04/01/2014 04/14/2014 05/01/2014 05/27/2014 06/05/2014 07/01/2014 08/16/201 09/01/2014

<tbody>
</tbody>

 05/15/2014 07/16/2014

<tbody>
</tbody>

 Monday Value Tuesday Value Wednesday Value Thursday Value Friday Value Saturday Value Sunday Value

<tbody>
</tbody>

Thank you for any assistance you can provide

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

#### Weazel

##### Well-known Member
Seems to work ok though there might be a better way....

in D2

=SUMPRODUCT((TEXT(WEEKDAY(\$A\$2:\$A\$9),"dddd")=C2)*(\$A\$2:\$A\$9>=\$A\$11)*(\$A\$2:\$A\$9<=\$B\$11))

 A B C D 1 Date Day Count 2 4/1/2014 Monday 0 3 4/14/2014 Tuesday 2 4 5/1/2014 Wednesday 0 5 5/27/2014 Thursday 1 6 6/5/2014 Friday 0 7 7/1/2014 Saturday 0 8 8/16/2014 Sunday 0 9 9/1/2014 10 11 5/15/2014 7/16/2014

<TBODY>
</TBODY>

#### VBA Geek

##### MrExcel MVP
<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">E1</th><td style="text-align:left">=SUMPRODUCT(<font color="Blue">--(<font color="Red">WEEKDAY(<font color="Green">\$A\$1:\$A\$8,2</font>)=ROWS(<font color="Green">D\$1:D1</font>)</font>)</font>)</td></tr></tbody></table></td></tr></table><br />

Excel 2013
ABCDE
101/04/2014Monday1
214/04/2014Tuesday3
301/05/2014Wednesday0
427/05/2014Thursday2
505/06/2014Friday0
601/07/2014Saturday1
716/08/2014Sunday1
807/09/2014
Sheet3

#### VBA Geek

##### MrExcel MVP
updated:

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">E1</th><td style="text-align:left">=SUMPRODUCT(<font color="Blue">--(<font color="Red">WEEKDAY(<font color="Green">\$A\$1:\$A\$8,2</font>)=ROWS(<font color="Green">D\$1:D1</font>)</font>),COUNTIFS(<font color="Red">\$A\$11,"<="&\$A\$1:\$A\$8,\$B\$11,">="&\$A\$1:\$A\$8</font>)</font>)</td></tr></tbody></table></td></tr></table><br />

Excel 2013
ABCDE
101/04/2014Monday0
214/04/2014Tuesday2
301/05/2014Wednesday0
427/05/2014Thursday1
505/06/2014Friday0
601/07/2014Saturday0
716/08/2014Sunday0
801/09/2014
9
10
1115/05/201416/07/2014
Sheet3

missed the other criteria

Worksheet Formulas
CellFormula
E1=SUMPRODUCT(--(WEEKDAY(\$A\$1:\$A\$8,2)=ROWS(D\$1:D1)))

</tbody>

Excel 2013
ABCDE
101/04/2014Monday1
214/04/2014Tuesday3
301/05/2014Wednesday0
427/05/2014Thursday2
505/06/2014Friday0
601/07/2014Saturday1
716/08/2014Sunday1
807/09/2014

</tbody>
Sheet3

##### New Member

Thank you so much. Worked first time. Just what I needed.

##### New Member
How do I get it to adjust for a value error within that field. For example, what if someone put "NA" into the A column?

#### Weazel

##### Well-known Member
Ideally preventing users from entering anything but a date would be ideal, in lieu of that you can try something like this which is an array.

again there's probably a better way...

=SUM(IF(\$A\$2:\$A\$9<>"na",IF(TEXT(WEEKDAY(\$A\$2:\$A\$9),"dddd")=C2,IF(\$A\$2:\$A\$9>=A11,IF(\$A\$2:\$A\$9<=\$B\$11,1))))) control shift enter

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,017
Messages
5,834,959
Members
430,330
Latest member
drAli77

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