Hi Friends, (With hopes of help)
I need help one of the codes which I have recorded. I'm getting error when I re-run it. I have two questions
1) Is it possible to move the entire rows to the next sheet with Criteria and only visible rows. ? Or Do I need to copy to next sheet and then come back to previous sheet and delete the visible rows either way is fine.
2) The next sheet where I want to paste the data is not fixed, so I want to choose the next empty row of the sheet and it starts with column A.
Any kind of help is greatly appreciated.. Thanks in advance. Here is the code I have recorded.
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("Advisory").Select
Selection.AutoFilter
ActiveSheet.ListObjects("Table_Query_from_MS_Access_Database3").Range. _
AutoFilter Field:=8, Criteria1:="UK&I - UK TAS"
Range("A3:P3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("TAS").Select
Selection.End(xlDown).Select
Range("A80").Select
ActiveSheet.Paste
Range("A2").Select
Sheets("Advisory").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Application.CutCopyMode = False
Selection.EntireRow.Delete
Selection.AutoFilter
Range("A2").Select
ActiveWorkbook.Save
End Sub
I need help one of the codes which I have recorded. I'm getting error when I re-run it. I have two questions
1) Is it possible to move the entire rows to the next sheet with Criteria and only visible rows. ? Or Do I need to copy to next sheet and then come back to previous sheet and delete the visible rows either way is fine.
2) The next sheet where I want to paste the data is not fixed, so I want to choose the next empty row of the sheet and it starts with column A.
Any kind of help is greatly appreciated.. Thanks in advance. Here is the code I have recorded.
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("Advisory").Select
Selection.AutoFilter
ActiveSheet.ListObjects("Table_Query_from_MS_Access_Database3").Range. _
AutoFilter Field:=8, Criteria1:="UK&I - UK TAS"
Range("A3:P3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("TAS").Select
Selection.End(xlDown).Select
Range("A80").Select
ActiveSheet.Paste
Range("A2").Select
Sheets("Advisory").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Application.CutCopyMode = False
Selection.EntireRow.Delete
Selection.AutoFilter
Range("A2").Select
ActiveWorkbook.Save
End Sub