Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.16 KB

Excel.Range.RemoveDuplicates.md

File metadata and controls

43 lines (27 loc) · 1.16 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.RemoveDuplicates method (Excel)
vbaxl10.chm144243
vbaxl10.chm144243
Excel.Range.RemoveDuplicates
0e74bde2-08b3-898d-0b30-53de911bd7e9
05/11/2019
medium

Range.RemoveDuplicates method (Excel)

Removes duplicate values from a range of values.

Syntax

expression.RemoveDuplicates (Columns , Header)

expression A variable that represents a Range object.

Parameters

Name Required/Optional Data type Description
Columns Required Variant Array of indexes of the columns that contain the 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.

Example

The following code sample removes duplicates with the first 2 columns.

ActiveSheet.Range("A1:C100").RemoveDuplicates Columns:=Array(1,2), Header:=xlYes

[!includeSupport and feedback]