Hi,
I wish to remove duplicates from each column starting with the column B. I used the following code. It does a good job of removing duplicates from each of the columns B to D. However, Have numerous more columns after D. What is the better solution. Thank you.
I wish to remove duplicates from each column starting with the column B. I used the following code. It does a good job of removing duplicates from each of the columns B to D. However, Have numerous more columns after D. What is the better solution. Thank you.
VBA Code:
Sub Remove_Duplicates_Example()
ActiveSheet.Range("A:A").RemoveDuplicates Columns:=Array(1), Header:=xlNo
ActiveSheet.Range("B:B").RemoveDuplicates Columns:=Array(1), Header:=xlNo
ActiveSheet.Range("C:C").RemoveDuplicates Columns:=Array(1), Header:=xlNo
ActiveSheet.Range("D:D").RemoveDuplicates Columns:=Array(1), Header:=xlNo
End Sub