---
title: "Finding Merged Cells In Your Google Sheet using Apps Script (And When To Be Careful)"
author: "Martin Hawksey"
date: 2020-12-04T10:59:25+00:00
modified: 2020-12-04T10:59:28+00:00
canonical_url: https://pulse.appsscript.info/p/2020/12/finding-merged-cells-in-your-google-sheet-using-apps-script-and-when-to-be-careful/
markdown_url: https://pulse.appsscript.info/p/2020/12/finding-merged-cells-in-your-google-sheet-using-apps-script-and-when-to-be-careful.md
categories:
  - "Beginner"
  - "Sheets"
  - "Solutions"
  - "V8"
tags:
  - "@benlcollins"
  - "benlcollins.com"
featured_image: https://pulse.appsscript.info/files/2020/12/mergedCellsAppsScript.gif
description: "Some very useful guidance from Ben Collins on merged cells within Google Sheets. As well as how to merge/unmerge cells Ben also highlights some of the pitfalls when merging cells. The post also includes a very useful snippet for detecting merged cells using .getMergedRanges(). "
---

# Finding Merged Cells In Your Google Sheet using Apps Script (And When To Be Careful)

![Finding Merged Cells In Your Google Sheet using Apps Script (And When To Be Careful)](https://pulse.appsscript.info/files/2020/12/mergedCellsAppsScript.gif)

> [https://www.benlcollins.com/spreadsheets/merge-cells/](https://www.benlcollins.com/spreadsheets/merge-cells/)
> Learn how to merge cells in Google Sheets, when to use them and when to avoid them [and] finding merged cells in your Google Sheet using Apps Script

Some very useful guidance from Ben Collins on merged cells within Google Sheets. As well as how to merge/unmerge cells Ben also highlights some of the pitfalls when merging cells. The post also includes a very useful snippet for detecting merged cells using .[`getMergedRanges()`**](https://developers.google.com/apps-script/reference/spreadsheet/range#getMergedRanges()).

Source: *[How To Merge Cells In Google Sheets And When To Be Careful*](https://www.benlcollins.com/spreadsheets/merge-cells/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2020/12/finding-merged-cells-in-your-google-sheet-using-apps-script-and-when-to-be-careful/](https://pulse.appsscript.info/p/2020/12/finding-merged-cells-in-your-google-sheet-using-apps-script-and-when-to-be-careful/)*
