Applies ToExcel for Microsoft 365 Excel 2024 Excel 2021 Excel 2019 Excel 2016

When shaping data, a common task is to keep or remove duplicate rows. The results are based on which columns you select as the comparison to determine duplicate values is based on the data selected.

  1. To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more information see Create, load, or edit a query in Excel.

  2. Select a column by clicking the column header. To select more than one column press Shift + Click or Ctrl + Click on each subsequent column. The columns can be contiguous or discontiguous.

  3. Select Home > Remove RowsRemove Duplicates.

  1. To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more information see Create, load, or edit a query in Excel.

  2. Select a column by clicking the column header. To select more than one column contiguously or discontiguously, press Shift+Click or CTRL+Click on each subsequent column.

  3. Select Home > Keep Rows > Keep Duplicates.

See Also

Power Query for Excel Help

Working with duplicates (docs.microsoft.com)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.