The follow code don’t work.
Public Sub CopyRows()
Sheets("Sheet1").Select
For x = 2 To 200
ThisValue = Cells(x, 5).Value
If ThisValue = "1" Then
Cells(x, 5).Resize(15, 25).Copy
Sheets("Sheet2").Select
NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(NextRow, 1).Select
ActiveSheet.Paste
Sheets("Sheet1").Select
End If
Next x
End Sub
We have sheet 1 of A file and would like to move required information to sheet 2 of A file . The final result should same as Named Move file sheet2. We should move the result (column f=1) to sheet 2,
if group=1(column p=1),paste A2,A3….
if group=2(column p=2), paste A22,A23…..
if group=3(column p=3),paste A32,A33….
The code should be?
Tks
Tom
Bookmarks