LucasLondon
06-24-2009, 03:43 AM
Hello,
I have a list of daily dates in column A of the format DD-MMM-YY that excludes any dates that fall on a saturday and sunday. For example the latest dates are below.
15-Jun-0916-Jun-0917-Jun-0918-Jun-0919-Jun-0922-Jun-09
What I would like to do is extend the dates to the most recent date but to exclude any weekend dates. For example if I update this file next Monday, I want to extend the above series with daily dates to 29-Jun-09, but I don't want the 27th or the 28th included in the series.
I guess the code would work something like this but there might be a more efficent way:
1) Find last populated cell in column A
Range("a65536").Select
Selection.End(xlUp).Select
2) Determine todays date
Today function (= Today)
3) Populate cells until todays date
Don't know how to do this!
4) Delete any dates that fall on a weekend from the lastest added dates.
if =WEEKDAY(cell) = 1 or 7 delete, row Don't know how to do rest of this!
The above approach is what seems most logical to me but there might be a more efficient or faster way.
Thanks,
Lucas
I have a list of daily dates in column A of the format DD-MMM-YY that excludes any dates that fall on a saturday and sunday. For example the latest dates are below.
15-Jun-0916-Jun-0917-Jun-0918-Jun-0919-Jun-0922-Jun-09
What I would like to do is extend the dates to the most recent date but to exclude any weekend dates. For example if I update this file next Monday, I want to extend the above series with daily dates to 29-Jun-09, but I don't want the 27th or the 28th included in the series.
I guess the code would work something like this but there might be a more efficent way:
1) Find last populated cell in column A
Range("a65536").Select
Selection.End(xlUp).Select
2) Determine todays date
Today function (= Today)
3) Populate cells until todays date
Don't know how to do this!
4) Delete any dates that fall on a weekend from the lastest added dates.
if =WEEKDAY(cell) = 1 or 7 delete, row Don't know how to do rest of this!
The above approach is what seems most logical to me but there might be a more efficient or faster way.
Thanks,
Lucas