Home |
Search |
Today's Posts |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Fri, 25 Apr 2008 07:13:05 -0700, Andy
wrote: I have a number of records and each has a field of start and end dates. What I need to work out is how I can count for each day of the week, how many days are included in this date range (excluding the last date). i.e. Start: 01/04/2008 End: 12/04/2008. Monday = 1 Tuesday = 2 Wednesday = 2 Thursday = 2 Friday = 2 Saturday = 1 Sunday = 1 In general: =INT((A2-WEEKDAY(A2+1-DOW)-A1+8)/7) where DOW = 1 for Sunday; 2 for Monday; etc. This formula assumes the starting date (A1) and ending date (A2) are both to be considered. In your example, however, you are not counting the Last Date (you only have one Saturday -- 05/04/2008; and you are not counting 12/04/2008). So you will need to modify the formula slightly so as not to include that last date, by subtracting one from each occurrence of A2: =INT(($A$2-1-WEEKDAY($A$2-C1)-$A$1+8)/7) --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
prompt for weekday and distribute the dates in columns | Excel Discussion (Misc queries) | |||
count weekday()=1 | Excel Worksheet Functions | |||
WEEKDAY() function: display TEXT not numeric weekday | Excel Discussion (Misc queries) | |||
How can I calculate dates and skip a specific weekday? | Excel Discussion (Misc queries) | |||
need to convert list of dates to count no. of dates by week | Excel Worksheet Functions |