Countif Weekday Array between multiple Dates

nomad737

New Member
Joined
Sep 24, 2014
Messages
3
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/201407/16/2014

<tbody>
</tbody>













MondayValue
TuesdayValue
WednesdayValue
ThursdayValue
FridayValue
SaturdayValue
SundayValue

<tbody>
</tbody>


Thank you for any assistance you can provide
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
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</SPAN>
Day</SPAN>
Count</SPAN>
2
4/1/2014 </SPAN>
Monday</SPAN>
0</SPAN>
3
4/14/2014 </SPAN>
Tuesday</SPAN>
2</SPAN>
4
5/1/2014 </SPAN>
Wednesday</SPAN>
0</SPAN>
5
5/27/2014 </SPAN>
Thursday</SPAN>
1</SPAN>
6
6/5/2014 </SPAN>
Friday</SPAN>
0</SPAN>
7
7/1/2014 </SPAN>
Saturday</SPAN>
0</SPAN>
8
8/16/2014 </SPAN>
Sunday</SPAN>
0</SPAN>
9
9/1/2014 </SPAN>
10
11
5/15/2014 </SPAN>
7/16/2014 </SPAN>

<TBODY>
</TBODY>
 
Upvote 0
<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
 
Upvote 0
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)))

<thead>
</thead><tbody>
</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

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3
 
Upvote 0
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?
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,217
Members
448,554
Latest member
Gleisner2

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