Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Sun, 18 Oct 2009 17:23:14 +0300, "afdmello"
wrote: I undertake trainings on sundays, wednesdays and Thursdays. Is there a way that I can get the number of sundays, tuesdays and wednesdays from January 2009 to September 30 2009 I use excel 2007 Thanking you Afd If your (inclusive) start date is in cell A1 and your (includive) end date is in cell A2, try the following formula: =SUMPRODUCT(LOOKUP(WEEKDAY(A$1+ROW(OFFSET(A$1,,,A$ 2-A$1+1))),ROW($1:$7),{1,0,1,0,1,0,0})) The {1,0,1,0,1,0,0} at the end of the formula is a vector representing Sunday, Monday, ..., Saturday where I have put a 1 for those weekdays to be counted and a 0 for the others. Hope this helps / Lars-Åke |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Sun, 18 Oct 2009 15:22:12 GMT, Lars-Åke Aspelin
wrote: On Sun, 18 Oct 2009 17:23:14 +0300, "afdmello" wrote: I undertake trainings on sundays, wednesdays and Thursdays. Is there a way that I can get the number of sundays, tuesdays and wednesdays from January 2009 to September 30 2009 I use excel 2007 Thanking you Afd If your (inclusive) start date is in cell A1 and your (includive) end date is in cell A2, try the following formula: =SUMPRODUCT(LOOKUP(WEEKDAY(A$1+ROW(OFFSET(A$1,,,A $2-A$1+1))),ROW($1:$7),{1,0,1,0,1,0,0})) The {1,0,1,0,1,0,0} at the end of the formula is a vector representing Sunday, Monday, ..., Saturday where I have put a 1 for those weekdays to be counted and a 0 for the others. Hope this helps / Lars-Åke Just noticed that there is an error in the formula I proposed, changed A$1 to A$7 in one place. Here is a the new version: =SUMPRODUCT(LOOKUP(WEEKDAY(A$1+ROW(OFFSET(A$7,,,A$ 2-A$1+1))),ROW($1:$7),{1,0,0,0,1,0,0})) Lars-Åke |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count the Number of Weekdays by Month | Excel Discussion (Misc queries) | |||
Extract Number of Weekdays (Mon-Fri) & Saturdays for a particular Month/Yr | Excel Worksheet Functions | |||
Linking a Specific Word to a Specific Number | Excel Worksheet Functions | |||
Number of Weekdays | Excel Worksheet Functions | |||
How do i count number of weekdays between two dates? | Excel Worksheet Functions |