Hello all,
I am trying to remove duplicates using VBA, and am having a bit of a challenge. I need the range to be based on however many rows are in the current sheet.
I am trying to remove duplicates using VBA, and am having a bit of a challenge. I need the range to be based on however many rows are in the current sheet.
VBA Code:
Sub NCINO_Loan()
'XAB 3.12.21
Dim Lastrow As Long
Dim R As Long
Application.ScreenUpdating = False
Lastrow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row '
' ActiveSheet.Range("$A$1:L" & Lastrow).RemoveDuplicates Columns:=18, Header:= _
xlYes 'this one doesn't work.
ActiveSheet.Range("$A$1:$AI$1288").RemoveDuplicates Columns:=18, Header:= _
xlYes
Exit Sub
Application.ScreenUpdating = True
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub