i have one column, column a, of which i want to copy the rows that contain the numbers 3171 and paste all of these rows into a new sheet.
i used this code before, and now that im trying to use it again its not working. all thats happening is that the first row with 3171 gets pasted into 300 rows of column a of sheet 2
Sub Paste3171
With Sheet1
.AutoFilterMode = False
With .Range("A1:A300")
.AutoFilter Field:=1, Criteria1:="3171"
.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheet2.Range("A1:A300")
End With
End With
also, i would like to not just select a1:a300 in both sheets, but preferrably the entire column because i often have over 300 values
i used this code before, and now that im trying to use it again its not working. all thats happening is that the first row with 3171 gets pasted into 300 rows of column a of sheet 2
Sub Paste3171
With Sheet1
.AutoFilterMode = False
With .Range("A1:A300")
.AutoFilter Field:=1, Criteria1:="3171"
.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheet2.Range("A1:A300")
End With
End With
also, i would like to not just select a1:a300 in both sheets, but preferrably the entire column because i often have over 300 values