I am trying to delete duplicate rows from my table and I thought this was straightforward enough looking at other examples online. Unfortunately, I am getting a type mismatch error on my variable. Also, I want the first instance from the bottom to be deleted not the first instance. So if row 5 and 27 are duplicates, I want row 27 to be deleted.
Here is my code:
Sub DeleteDuplicateRows()
Dim Rng As Range
With Worksheets("Database")
Set Rng = Range("C1", Range("Q1").End(xlDown))
Rng.RemoveDuplicates Columns:=Array(3, 17), Header:=xlYes
End With
End Sub