I have a shared file and I am trying to create a macro that will copy a row and paste it to the last row in a different sheet. The issues that I am having is that sometimes the target sheet will have filters applied by other teammates. Is there a way to code the macro to ignore the filters and paste into the last row without having to remove the filters? Here the macro that I currently have.
Thanks in advance!
VBA Code:
Sub OpenOrders_InTransit()
'
'Move row from Open Orders to In Transit
'
Dim RL As Long, CL As Integer
RL = ActiveCell.Row
CL = ActiveCell.Column
Application.ScreenUpdating = False
ActiveCell.Select
Selection.EntireRow.Select
Selection.Cut
Sheets("In Transit").Select
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 4).Range("A1").Select
Selection.Delete Shift:=xlToLeft
ActiveCell.Offset(0, 14).Range("A1").Select
Selection.Delete Shift:=xlToLeft
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
Sheets("Open Orders").Select
'
' RemoveEmptyRows Macro
'
'
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.EntireRow.Delete
Application.ScreenUpdating = True
'
'Return to previous cell
'
Cells(RL, CL).Select
End Sub
Thanks in advance!