Thread: copy rows
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
max max is offline
external usenet poster
 
Posts: 12
Default copy rows

I am trying to avoid using select. Does anyone have any better code to achieve the following result

Sub loopcopy(
Dim target As Strin
target = "Asset
For a = 1 To 200
If Sheets(1).Cells(a, 1) = target Then GoSub hi
Next
Exit Su

hit
x = Application.CountA(Sheets(2).Columns("a")
Rows(a).Cop
Sheets(2).Selec
Rows(x).Selec
ActiveSheet.Past
Sheets(1).Selec
Retur

End Su

TIA