Hi,
I need help on the next possible loop. I was able to make a syntax which will show all the calendar days of a specific month and year. However, I also need the succeeding months day after that result within the specified year. How can I do that?
My current syntax is below with result attached. What I wanted to happen next are the succeeding calendar days per column.
Thanks a lot for your help ?
Sub test()
Dim xdate As Date
Dim x As Integer
x = 2
xdate = DateSerial(Range("b2").Value, Range("a2").Value, 1)
Range("C2:C32").Select
Selection.ClearContents
Do While Range("a2").Value = Month(xdate)
Cells(x, 3).Value = xdate
xdate = xdate + 1
x = x + 1
Do
Do While Range("a2").Value = Month(xdate)
Cells(x, y).Value = xdate
xdate = xdate + 1
x = x + 1
Loop
End Sub
I need help on the next possible loop. I was able to make a syntax which will show all the calendar days of a specific month and year. However, I also need the succeeding months day after that result within the specified year. How can I do that?
My current syntax is below with result attached. What I wanted to happen next are the succeeding calendar days per column.
Thanks a lot for your help ?
Sub test()
Dim xdate As Date
Dim x As Integer
x = 2
xdate = DateSerial(Range("b2").Value, Range("a2").Value, 1)
Range("C2:C32").Select
Selection.ClearContents
Do While Range("a2").Value = Month(xdate)
Cells(x, 3).Value = xdate
xdate = xdate + 1
x = x + 1
Do
Do While Range("a2").Value = Month(xdate)
Cells(x, y).Value = xdate
xdate = xdate + 1
x = x + 1
Loop
End Sub