People who use my Insert and Delete Cell Add-on for Google Sheets have been reporting this error. Â I was unable to recreate the error until someone shared a spreadsheet with me and I found the culprit: merged cells.
What’s going on?
When you insert cells and shift the existing contents down, my Add-on selects the range of cells from your selection to the bottom of the sheet and moves it down. Â But if there are merged cells below your selection, the new range doesn’t make sense and an error is generated. Â The same thing happens if you try to delete and shift up, or if you try to shift left or right with merged cells to the right of your selection.
Why not catch the error and generate a friendly error message?
I’ve been trying, but this error isn’t triggering the try – catch section of my code. Â There also isn’t a way to detect merged cells without trying some strange tricks that would take a lot more time than I have. Â I’ve opened a bug report with Google about this.
This error seems to be Google’s version of “We’re not sure what happened, and hope that if the customer tries again it might go away”.