다음을 통해 공유


Range.RemoveDuplicates Method (Excel)

Removes duplicate values from a range of values.

Version Information

추가된 버전: Excel 2007

Syntax

.RemoveDuplicates(Columns, Header)

A variable that represents a Range object.

Parameters

Name

Required/Optional

Data Type

Description

Columns

선택

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

선택

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.

Example

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

참고 항목

개념

Range Object

Range Object Members