Skip to main content

Merge Duplicate Rows in Excel Using Zapier

Merge Rows is a Zapier action by PDF4me that consolidates duplicate Excel rows by grouping them on key columns you choose. Combine multiple order rows per customer, aggregate product variants, or roll up category data automatically, non-key values are merged with a semicolon separator and internal duplicates are removed. The result is clean, consolidated data without manual spreadsheet work.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

How Do I Authenticate My API Request?

To access the PDF4me Web API through Zapier, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Zapier workflows and PDF4me's powerful Excel row merging services.

PDF4me Excel Merge Rows Zapier configuration - File, File Name, Worksheet Numbers 1,3, Merge Key Columns 5, Output Format XLSX
Configure the Excel Merge Rows action, File input, worksheet targeting, merge keys, and output format.

Important Facts You Should Not Miss

Only File is truly required
The screenshot confirms File is the only field carrying an asterisk in the Zapier UI. File Name, Worksheet Numbers, Merge Key Columns, and Output Format are all optional.
This is not Excel's Merge Cells feature
This action groups duplicate rows by key column values and consolidates their other values, it does not visually merge adjacent cells the way Excel's native Merge Cells button does.
Empty Merge Key Columns means exact duplicates only
Leave Merge Key Columns blank to merge only rows that are identical across every column, the narrowest possible grouping.

Configuration at a Glance

Example configuration from the Zapier interface

The screenshot shows merging rows in worksheets 1 and 3 using column 5 as the merge key, with File and File Name mapped from a previous step and Output Format set to XLSX.

File

add_header_sample_file.xlsx

Worksheet Numbers

1,3

Merge Key Columns

5

Output Format

XLSX

Parameters

Complete list of parameters for the Merge Rows action. Parameter names match the Zapier configuration UI.

Required in the Zapier UI: File only. File Name, Worksheet Numbers, Merge Key Columns, and Output Format are all optional. Both worksheet and column numbers use 1-based indexing (1 = first worksheet, 1 = column A).

ParameterRequiredWhat it doesExample
FileRequiredExcel file content, mapped from a previous step using full file content.[2. File from Step 2]
File NameConditionalFilename with .xlsx or .xls extension, used for output naming.add_header_sample_file.xlsx
Worksheet NumbersConditionalComma-separated, 1-based worksheet numbers to process. 1 is the first worksheet.1,3
Merge Key ColumnsConditionalComma-separated, 1-based column numbers used to identify duplicate rows. Empty merges only exact duplicates across every column.5
Output FormatConditionalOutput file format: XLSX, XLS, XLSB, or CSV.XLSX

What Fields Does the Output Include?

The action returns the consolidated Excel file plus tracking metadata. This output shape is shared across Merge Rows, Add Rows, Delete Rows, and other PDF4me Excel actions that return a file.

FieldTypeWhat it contains
Job IdStringUnique identifier for the Zapier job execution.
File UrlURLAPI endpoint to download the processed Excel file. Map this to the next step, Drive, Dropbox, or another PDF4me Excel action.
Alternate File UrlURLAlternate download URL with the filename in the path.
File NameStringBase filename without extension.
File ExtensionStringFile extension of the output, matching the chosen Output Format.
Full File NameStringComplete filename including extension.
Document IdStringUnique identifier for the processed document.
File SizeNumberSize of the output file in bytes.
Doc TextStringExtracted text, typically empty for Excel merge output.

Typical Setups

Workflow ExamplesCommon Zapier workflow patterns using Merge Rows.
Consolidate multiple orders per customer
  1. A scheduled trigger retrieves the day's order export from the e-commerce system.
  2. Merge Rows runs with Worksheet Numbers set to 1 and Merge Key Columns set to the CustomerID column, so every order for the same customer becomes one row with order details combined by semicolons.
  3. The consolidated file is uploaded to a customer-service Drive folder for review.
Remove exact duplicate rows on import
  1. A new data file lands in a Dropbox import folder, triggering the Zap.
  2. Merge Rows runs with Merge Key Columns left empty, so only rows that are identical across every column are consolidated, equivalent to standard duplicate removal.
  3. The cleaned file is uploaded to a Dropbox folder used by downstream systems.
Roll product data up to category level
  1. A weekly trigger retrieves product sales data from SharePoint.
  2. Merge Rows runs with Merge Key Columns set to the Category and Subcategory columns and Output Format set to CSV, consolidating all products within each category into one row for database import.
  3. The rollup is emailed to the marketing team as a category performance summary.

Practical Tips

Map full file content, not a reference
If File shows "Exists but not shown", pick the mapping option that provides full file content, or the action returns a File Is Empty error.
Merge Key Columns controls the grouping granularity
A single key column groups broadly (all rows sharing that value), while multiple key columns require an exact match across all of them before rows are merged.
Non-key values are semicolon-joined, not summed
Numeric columns outside the key are combined as text with a semicolon separator, not added together. Do downstream math separately if you need totals.
Worksheet Numbers accepts multiple sheets at once
List several 1-based worksheet numbers, such as 1,3, to run the merge across more than one sheet in a single action call.
This is not Excel's Merge Cells feature
It groups and consolidates duplicate rows, it does not visually join adjacent cells the way Excel's built-in Merge Cells button does.

Cheat Sheet

FieldValue
ActionMerge Rows
File[mapped from previous step, full content]
File Nameadd_header_sample_file.xlsx
Worksheet Numbers1,3
Merge Key Columns5
Output FormatXLSX

Frequently Asked Questions

How do I merge duplicate rows in Excel automatically in Zapier?+
Add the PDF4me Merge Rows action to a Zap, map File with full file content, set Worksheet Numbers and Merge Key Columns to identify the grouping, choose an Output Format, and run the Zap. See Microsoft's guide to merging and unmerging cells for how Excel's own, different, cell-merge feature works by comparison.
What happens to the non-key column values when rows are merged?+
Values from non-key columns are combined into a single cell separated by semicolons, and duplicate values within that merged cell are removed automatically, so you get one clean, consolidated value instead of a comma pile-up.
What if I leave Merge Key Columns empty?+
With no key columns specified, the action only merges rows that are exact duplicates across every column, which is the narrowest possible match, equivalent to standard duplicate-row removal.
Can I merge rows across more than one worksheet in a single run?+
Yes. Worksheet Numbers accepts a comma-separated list such as 1,3, and the merge runs on each listed worksheet within the same action call.
Is this the same as Excel's Merge Cells feature?+
No. Excel's native Merge Cells visually joins adjacent cells into one, it does not combine data from duplicate rows. This action instead groups rows that share the same key column values and consolidates their other column values into one row per group. See Ablebits' guide on merging rows without losing data for the manual approach this action automates.

Same Task on Other Platforms

Industry Use Cases & Applications

  • Customer Order Consolidation: Merge multiple order rows per customer into single record showing all orders
  • Product SKU Aggregation: Consolidate product variants by parent SKU grouping all variants together
  • Account Rollup: Merge account activity rows by account ID combining all transactions
  • Territory Consolidation: Group sales data by territory merging all rep activities per territory
  • Channel Aggregation: Consolidate sales by channel (direct, partner, online) showing all products per channel

Get Help