Need Hlep to correct the Code

Mallappa

New Member
Joined
Jul 20, 2012
Messages
15
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
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top