Wil Moosa
Well-known Member
- Joined
- Aug 11, 2002
- Messages
- 893
I use the following code in a few workbooks:
As I don’t really fully onderstand the array-thing I haven’t been able to adjust the code to my new needs.
The situation is now that I have a range of A1:AK100 where A1:AK1 = the xlheader. I want to remove every duplicate row - including A:C - based on the data in the columns D:AK. I gave it a try as follows but it did not work as I intended. Any suggestions?
CODE=vba]ActiveSheet.Range("A2:AK100").RemoveDuplicates Columns:=Array(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17)[/CODE]
VBA Code:
ActiveSheet.Range("A2:Z100").RemoveDuplicates Columns:=Array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17)
As I don’t really fully onderstand the array-thing I haven’t been able to adjust the code to my new needs.
The situation is now that I have a range of A1:AK100 where A1:AK1 = the xlheader. I want to remove every duplicate row - including A:C - based on the data in the columns D:AK. I gave it a try as follows but it did not work as I intended. Any suggestions?
CODE=vba]ActiveSheet.Range("A2:AK100").RemoveDuplicates Columns:=Array(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17)[/CODE]