EXCEL Remove duplicates function

The EXCEL Remove duplicates function removes duplicate rows from a range.

Help CentreBuilding Processes

This article describes the RPA Excel functionality to remove duplicate rows.

For a full list of available functions, please read EXCEL functions.


Description

The EXCEL Remove duplicates function removes duplicate rows from a range. On Windows, it uses Excel's built-in RemoveDuplicates feature. On macOS, it uses a Python-based deduplication. You can optionally specify which columns to check for duplicates.


Setting it up

To use the EXCEL Remove duplicates function, follow these instructions:

{{popups:rpas/add:action=excel-remove-duplicates}}

Once on a process map:

  1. Navigate to the process where you would like to add the EXCEL Remove duplicates function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the EXCEL Remove duplicates option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
File pathYesTextFull path to the Excel file.
SheetYesTextName of the sheet.
RangeNoTextUsed rangeRange address (e.g. A1:D100). Defaults to the used range of the sheet.
Columns to checkNoTextAll columnsComma-separated column names or letters to check for duplicates (e.g. A, B or Name, Email).

Output variables

This action does not produce any output variables.


Errors

ErrorDescription
File not openThe Excel file must be open.
Sheet not foundThe specified sheet does not exist.
Column not foundA specified column name or letter does not exist in the range.

Tips

  • If no columns are specified, all columns are compared to determine duplicates.
  • The first occurrence of each duplicate is kept; subsequent duplicates are removed.
  • Specify only key columns (e.g. Email) to remove rows with duplicate emails regardless of other column values.

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.