VBA Loop
I keep getting a compile error and it highlights the first "Cells"
piece of code, any ideas?
Bob Phillips wrote:
Wrap-ariound
iTarget = 7
For i = 1 To Cells(Rows,Count,"A").End(xlUp).Row
If Cells(i,"A").Value = "All" Then
Cells(i,"B").Resize(,5).Copy _
Worksheets("Sheet2").Cells(iTarget,"A")
itarget = iTarget + 1
End If
Next i
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Bob Phillips" wrote in message
...
iTarget = 7
For i = 1 To Cells(Rows,Count,"A").End(xlUp).Row
If Cells(i,"A").Value = "All" Then
Cells(i,"B").Resize(,5).Copy
Worksheets("Sheet2").Cells(iTarget,"A")
itarget = iTarget + 1
End If
Next i
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"JI" wrote in message
oups.com...
My VBA knowledge isnt up to that level yet, anything more simple you
could show me something that perhaps would look at all the values in
column A:A of "sheet1" if they equaled value "All" then copy columns
B:F on that row and paste it to "sheet2" starting in row 7 column A:A.
Thanks.
|