VBA code to delete dupl. rows from another sheet

Issue

I need a way to delete duplicate rows in Sheet 1, which has the same number of columns (9) as Sheet 2. Sheet 2 has a header (data starts in row 2) and typically contains about 100 rows. Sheet 1 has a header (data starts in row 3). Is it possible to delete the duplicates in Sheet 1 without deleting the headers?

Fenced code blocks remain unchanged.

Answer

Yes, it is possible to delete the duplicates in Sheet 1 without deleting the headers. You can use the following steps to achieve that:

  1. In Sheet 1, select the range of cells that contains the data (excluding the header row).
  2. Go to the “Data” tab in the Excel ribbon.
  3. Click on the “Remove Duplicates” button.
  4. In the “Remove Duplicates” dialog box, make sure the checkbox for “My data has headers” is checked.
  5. Click the “OK” button.

This will remove any duplicate rows in Sheet 1 while preserving the header row.