I am having some trouble using the Dynamic Range and Next Avaiable forumals that I devised within my macro. I recorded the macro first, and then edited it with the dynamic range and next available row in a colum macros.
Thanks
Code:
Sub K2TORMTMAccDetailLD_General_S()
Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=5, Criteria1:="INT-ALM"
Range(("A2"), Range("N65536").End(xlUp)).Select
Selection.EntireRow.Delete
Selection.AutoFilter
Selection.Copy
Sheets("K2MTM").Select
Dim LastCell As Range
With ActiveSheet
Set LastCell = .Cells(.Rows.Count, "A").End(xlUp)
If IsEmpty(LastCell) Then
'do nothing
Else
Set LastCell = LastCell.Offset(1, 0)
End If
End With
MsgBox LastCell.Row
ActiveSheet.Paste
End Sub
Thanks
Last edited by a moderator: