Gists
Overview
This Google Apps Script helps identify and analyze regions of colored cells in a Google Sheet.
Description
Recently, I encountered a situation where I needed to identify colored cell regions in Google Sheets. For instance, consider the following spreadsheet:
The region enclosed by the red cells (B2:D4) is a rectangle. In this case, the closed region can be easily identified using a simple script in Google Sheets. However, the region enclosed by the blue cells (H3, I2, J2,,,) is more complex. It consists of multiple disconnected cells that form a single shape. Identifying such irregular shapes using a script can be challenging.