Aussiebear
10-08-2014, 08:01 PM
Microsoft offers the following advice when trying to remove duplicates based on multiple criteria
Excel Developer Reference
Range.RemoveDuplicates Method
Removes duplicate values from a range of values.
Version Information
Version Added: Excel 2007
Syntax
expression.RemoveDuplicates(Columns, Header)
expression A variable that represents a Range object.
Parameters
Name Required/Optional Data Type Description
Columns Optional Variant Array of indexes of the columns that contain the duplicate information. If nothing is passed then it assumes all columns contain duplicate information.
Header Optional XlYesNoGuess Specifies whether the first row contains header information. xlNo is the default value; specify xlGuess if you want Excel to attempt to determine the header.
The following code sample removes duplicates with all columns from a range.
ActiveSheet.Range("A1:C100").RemoveDuplicates
The following code sample removes duplicates with the first 2 columns
ActiveSheet.Range("A1:C100").RemoveDuplicates Columns:=Array(1,2), Header:=xlYes
© 2007 Microsoft Corporation. All rights reserved.
Is there really no limit to the number of criteria,(other than the total number of possible columns)?
Excel Developer Reference
Range.RemoveDuplicates Method
Removes duplicate values from a range of values.
Version Information
Version Added: Excel 2007
Syntax
expression.RemoveDuplicates(Columns, Header)
expression A variable that represents a Range object.
Parameters
Name Required/Optional Data Type Description
Columns Optional Variant Array of indexes of the columns that contain the duplicate information. If nothing is passed then it assumes all columns contain duplicate information.
Header Optional XlYesNoGuess Specifies whether the first row contains header information. xlNo is the default value; specify xlGuess if you want Excel to attempt to determine the header.
The following code sample removes duplicates with all columns from a range.
ActiveSheet.Range("A1:C100").RemoveDuplicates
The following code sample removes duplicates with the first 2 columns
ActiveSheet.Range("A1:C100").RemoveDuplicates Columns:=Array(1,2), Header:=xlYes
© 2007 Microsoft Corporation. All rights reserved.
Is there really no limit to the number of criteria,(other than the total number of possible columns)?