Hi,
I tried the following code and it worked ok. But I want the results on a different worksheet, ie sheet2, in the same book.
I also want to apply this only on the specific two columns F and G.(I want to leave the other columns as they are)
regards,
Listter
Sub RemoveNoise() Dim lngLastRow As Long Rows(1).Insert lngLastRow = Range("A" & Rows.Count).End(xlUp).Row With Range("B1:B" & lngLastRow) .Formula = "=COUNTIF($A$1:A1,A1)" .AutoFilter 1, "<>1" End With With Rows("1:" & lngLastRow) .SpecialCells(xlCellTypeVisible).Clear .Rows("1:" & lngLastRow).Sort Range("A1"), xlAscending End With Columns("B").Clear End Sub</pre>
I tried the following code and it worked ok. But I want the results on a different worksheet, ie sheet2, in the same book.
I also want to apply this only on the specific two columns F and G.(I want to leave the other columns as they are)
regards,
Listter
Sub RemoveNoise() Dim lngLastRow As Long Rows(1).Insert lngLastRow = Range("A" & Rows.Count).End(xlUp).Row With Range("B1:B" & lngLastRow) .Formula = "=COUNTIF($A$1:A1,A1)" .AutoFilter 1, "<>1" End With With Rows("1:" & lngLastRow) .SpecialCells(xlCellTypeVisible).Clear .Rows("1:" & lngLastRow).Sort Range("A1"), xlAscending End With Columns("B").Clear End Sub</pre>