Probably something like this
Option Explicit Sub RemoveDuplicates_1() Dim r1 As Range, r2 As Range, r As Range With ActiveSheet Set r1 = .Cells(2, 1) Set r2 = .Cells(.Rows.Count, 1).End(xlUp) Set r = Range(r1, r2) On Error Resume Next r.SpecialCells(xlCellTypeConstants, xlTextValues).EntireRow.Delete r.SpecialCells(xlCellTypeBlanks).EntireRow.Delete On Error GoTo 0 .Cells(1, 1).CurrentRegion.RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22), Header:=xlYes End With End Sub




Reply With Quote