who can about my column 2 and 3?
here is my sample code.
Sub forloop() Dim c As Integer ActiveSheet.Range("A1") = "Year" For c = 2 To 61 ActiveSheet.Range("A" & c) = "2009" Activesheet.Range("B" & c) = "A1" Next c End Sub
who can about my column 2 and 3?
here is my sample code.
Sub forloop() Dim c As Integer ActiveSheet.Range("A1") = "Year" For c = 2 To 61 ActiveSheet.Range("A" & c) = "2009" Activesheet.Range("B" & c) = "A1" Next c End Sub
What is the question?
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
how can i use for loop to me to get my output (screenshot) whenever i create a new work sheet? i'm stuck at column 2 and 3. my code only works for column 1. i try this code at my column 3
For count = 2 To 61 If count >= 4 Then ActiveSheet.Range("D2:D4") = "2" Else If count >= 7 Then ActiveSheet.Range("D5:D7") = "1" End If Next count
It is impossible to say at present because you haven'y explained the rules for setting the values to 1 or 2, why sometimes there are 3, sometimes a lot more.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber