Question:
I want to enter the Weekdays Mon - Fri in Column A with an empty Cell following and the Date belonging to them in Column B for a pre-determined period. How can I do this with?
Answer:
Use the following Code with Excel5/7 in an English-language, with Excel8 in a general Module and run it.
Place the code below into the standard module
Sub WeekendOut()
Dim Start As Date, Off As Date
Dim y%, i#
Start = InputBox("Start Date:")
Off = InputBox("End Date:")
For i = Start To Off
y = y + 1
If WeekDay(i, 2) < 6 Then
Cells(y, 2) = Format(i, "dd.mm.yy")
Cells(y, 1) = Format(i, "dddd")
ElseIf WeekDay(i, 2) = 6 Then
Else
y = y - 1
End If
Next i
End Sub