Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Detect Which Cells Are Merged In Google Sheets

While trying to remove duplicate phone numbers from a relatively large list I recently combined, Google Sheets presented me with this error message:

There was a problem. Your selection contains a merged cell. To remove duplicates, all cells must contain the same number of rows and columns.

The formula I used to test and try to expose merged cells within Google sheets was:

=if(columns(A2:F2) = 6, "True", "False")

But this always returned true Because even though the cells may be merged they are still considered individual cells.

I am wondering if there is an easy way to discover and sort out these cells in Google Sheets. Excel used to have a very simple way of doing it but has since removed the functionality.

Any ideas?

like image 666
Ethan Avatar asked Jul 06 '19 14:07

Ethan


People also ask

How do you reference a cell that is merged?

Right-click the merged cell B1:D1, select "paste special -> formulas" You should see the merged cell being 0. Type Col1 in the merged cell. You should now see all B2, C2, D2 to be Col1, i.e. now you can reference the merged cell as you expect it to be.


1 Answers

if you have such an option you can use Conditional Formatting to check for merged cells like:

=MOD(COLUMN(),2)=0

enter image description here

where you can immediately spot merged cells where the color pattern is interrupted


in the same manner you can use this formula for rows:

=MOD(ROW(),2)=0

enter image description here


or you can play with scripts to find merged cells: https://issuetracker.google.com/issues/36753230

like image 157
player0 Avatar answered Sep 21 '22 11:09

player0