Phelony
06-05-2009, 07:06 AM
Hi Guys
I'm trying to copy a row from one location and paste it into the First visible row on a filtered sheet, offset to not put it on the header obviously!
What I've got is:
Sub reintegrationtest()
Application.ScreenUpdating = False
Sheets("Sheet1").Select
ActiveSheet.Range("$A:$E").Select
Selection.AutoFilter
ActiveSheet.Range("$A:$AP").AutoFilter Field:=1, _
Criteria1:=Sheets("Sheet2").Range("$A$2")
Sheets("Sheet2").Select
Selection.Offset(1, 0).EntireRow.Copy
Sheets("Sheet1").Select
Range("A1").Offset(1, 0).Hidden = False
Sheets("Sheet1", "Sheet2").ShowAllData
Sheets("Sheet1").Select
End Sub
I know the issue is in the:
Sheets("Sheet1").Select
Range("A1").Offset(1, 0).Hidden = False
But I can't find the right commands to get me out of it. :banghead:
Can someone put me right please?
Thanks
Phel x
I'm trying to copy a row from one location and paste it into the First visible row on a filtered sheet, offset to not put it on the header obviously!
What I've got is:
Sub reintegrationtest()
Application.ScreenUpdating = False
Sheets("Sheet1").Select
ActiveSheet.Range("$A:$E").Select
Selection.AutoFilter
ActiveSheet.Range("$A:$AP").AutoFilter Field:=1, _
Criteria1:=Sheets("Sheet2").Range("$A$2")
Sheets("Sheet2").Select
Selection.Offset(1, 0).EntireRow.Copy
Sheets("Sheet1").Select
Range("A1").Offset(1, 0).Hidden = False
Sheets("Sheet1", "Sheet2").ShowAllData
Sheets("Sheet1").Select
End Sub
I know the issue is in the:
Sheets("Sheet1").Select
Range("A1").Offset(1, 0).Hidden = False
But I can't find the right commands to get me out of it. :banghead:
Can someone put me right please?
Thanks
Phel x