Hi folks,
I am a bit syuck on the auto-filter syntax.
can anyone tell me how to change this so that I am not copying and pasting the whole row, but only copying range "A" to "L" to usdrws and pasting into range "B" to "M", (same rows as below).
It does work as it is, but I want to paste to column B, not A.
full code ...
thanks for any help
I am a bit syuck on the auto-filter syntax.
can anyone tell me how to change this so that I am not copying and pasting the whole row, but only copying range "A" to "L" to usdrws and pasting into range "B" to "M", (same rows as below).
Code:
ws.AutoFilter.Range.Offset(1).EntireRow.Copy Trgtws.Range("L" & Rows.Count).End(xlUp).Offset(1, -11)
It does work as it is, but I want to paste to column B, not A.
full code ...
Code:
With Workbooks.Open(myFile)
Set wb = Workbooks.Open(FileName:=myFile, ReadOnly:=False)
For Each ws In wb.Worksheets
ws.Columns("k").Hidden = False
Usdrws = ws.Range("L" & Rows.Count).End(xlUp).Row
ws.Range("A1:L" & Usdrws).AutoFilter Field:=12, Criteria1:="*zhan*", Operator:=xlOr, Criteria2:="*revenue*"
'Worksheets("Sheet1").Range("A1").AutoFilter Field:=2, Criteria1:="Printer", Operator:=xlOr, Criteria2:="Projector"
ws.AutoFilter.Range.Offset(1).EntireRow.Copy Trgtws.Range("L" & Rows.Count).End(xlUp).Offset(1, -11)
ws.AutoFilterMode = False
Next ws
wb.Close False
End With
thanks for any help