Count Days of Week

iherndon

Board Regular
Joined
May 24, 2009
Messages
102
I guess this might be sorta simple for most, but I'm kind of stumped.

Here's what I've got:

25,000 rows of data from 1/1/2012 to 6/1/2012. Cell A1 is the format 'MM/DD/YYYY HH:MM:SS AM/PM'

I'm essentially trying to determine the volume by day. I have a total count for each day but now need a simplified way to determine x amount of Mondays to divide by the total # of records generated on Mondays. So if there are 100 records for a particular date range and that period of time consists of 10 different Mondays, the average would be 10.

Thanks for any help you can provide!

@IanHerndon
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I didn't find this with my first search but ended up discovering the solution from this previous thread: http://www.mrexcel.com/forum/showthread.php?526867-Breakdown-Days&highlight=count+days+week

In Excel's WEEKDAY function, Sunday = 1, so this array formula will give the answer if:

A2 = start date
B2 = end date
C2 = day of week to count

This formula in E2:
=SUM(IF(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2,1,0))

...confirmed by pressing CTRL-SHIFT-ENTER to confirm the formula.

Sheet2

ABCDE
1FromToDay of Week Count
26/1/20116/22/20111 3

<colgroup><col style="font-weight: bold; width: 30px; "><col style="width: 64px; "><col style="width: 64px; "><col style="width: 88px; "><col style="width: 64px; "><col style="width: 64px; "></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
E2{=SUM(IF(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2,1,0))}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,203,514
Messages
6,055,836
Members
444,828
Latest member
StaffordStag

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