Hi
I Want to build an excel file that looks like this:
On column A the user put years (i.e: a1 is 2015 , a2 is 2016 , a3 is 2017)
I want the macro will put on column C the year/month (i.e: c1 is 1/2015 , c2 is 2/2015 , c12 is 12/2015 , c13 is 1/2016 , c36 is 12/2017)
I want to get 36 cells with year/month.
I try to build this macro , but its not work ok.
This is what i have:
Sub loop()
Dim i As Integer, j As Integer, t As Integer
Columns("c:c").Select
Selection.NumberFormat = "@"
t = Application.WorksheetFunction.CountA(Columns(1)) * 12
For j = 1 To 2
For i = 1 To 12
For m = 1 To t
Range("c" & m).Value = i & "/" & Range("a" & j)
Next m
Next i
Next j
End Sub
I need help to do it correct
TNX
I Want to build an excel file that looks like this:
On column A the user put years (i.e: a1 is 2015 , a2 is 2016 , a3 is 2017)
I want the macro will put on column C the year/month (i.e: c1 is 1/2015 , c2 is 2/2015 , c12 is 12/2015 , c13 is 1/2016 , c36 is 12/2017)
I want to get 36 cells with year/month.
I try to build this macro , but its not work ok.
This is what i have:
Sub loop()
Dim i As Integer, j As Integer, t As Integer
Columns("c:c").Select
Selection.NumberFormat = "@"
t = Application.WorksheetFunction.CountA(Columns(1)) * 12
For j = 1 To 2
For i = 1 To 12
For m = 1 To t
Range("c" & m).Value = i & "/" & Range("a" & j)
Next m
Next i
Next j
End Sub
I need help to do it correct
TNX