Google-sheets – How to merge multiple similar rows into unique rows in Google Sheets

google sheets

We have a task in hand.

Current Google Sheets look like this:

enter image description here

We want to make Google Sheets look like this:

enter image description here

What are we currently doing?

  1. Select all similar rows
  2. Click on format menu -> merge -> merge vertically

What is not working for us?
Our Google Sheets contains 2k rows, not possible for us to do manually for each row.

What are we excepting?
Some formula or solution where we can do this automatically.

Best Answer

To remove duplicates so that you get just one copy of each unique row in the range A1:C in Sheet1, use this:

=unique(Sheet1!A1:C)

To automatically merge rows in-place so that cells with identical values span many rows vertically, you will need a script. See the mergeBlankCellsWithNonBlankCellAboveAndDrawBorders_ script for sample code.