Home |
Search |
Today's Posts |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to list dates in a month of particular weekday
Here is a much shorter function to do what the function at the link does...
Function NthWeekday(DateIn As Date, Nth As Long, DOW As Long) As Date NthWeekday = DateSerial(Year(DateIn), Month(DateIn), 1 + 7 * Nth) - _ Weekday(DateSerial(Year(DateIn), Month(DateIn), 8 - DOW)) End Function This function is just the general formula I posted elsewhere in this thread converted to a one-liner VB statement. -- Rick (MVP - Excel) "Jeff" wrote in message ... MSDN has a good exaple of finding a day http://msdn.microsoft.com/en-us/libr...32(VS.60).aspx "MasterDragon" wrote: MY question is simple, sorry if i'm being stupid. Can anyone tell me how can i make a list which contains only dates of all the Fridays in a particular month? In a more advanced sense, can I create a list with all the Fridays AND Saturdays of a month? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
List of dates for month from start date | Excel Discussion (Misc queries) | |||
Counting Blanks in a list of dates by month | Excel Worksheet Functions | |||
LIST DATES IN MONTH ORDER | Excel Worksheet Functions | |||
Xth Weekday of the Month/Year | Excel Programming | |||
How do I sort a list of dates in Excel by month and day? | Excel Discussion (Misc queries) |