How to Insert and Delete Cells from Google Spreadsheets

[update on 9/24/2014:  This has now been published as a Google Add-on.  Please see this page.  To install the Add-on, just search for “insert cells” when browsing for Add-ons from Google Sheets]

I haven’t been able to find a way in Google Spreadsheets to insert a cell (or cells) in the middle of a spreadsheet and tell the existing content to shift down or to the right.  Similarly, I’d like to be able to select cells to delete, and have them fill in by content shifting up or from the right.

So, I created a Google Apps script to add “Insert Cells” and “Delete Cells” menus to Google Spreadsheets.  Right now, you need to copy the code from github and paste it into the Script Editor in Google Spreadsheets (see the Tools menu).  Hopefully I’ll get the code cleaned up enough to have Google approve it as an Add-on soon!

Watch the video for a demonstration.

[youtube]https://www.youtube.com/watch?v=g5oTm3BeTCk[/youtube]

8 thoughts on “How to Insert and Delete Cells from Google Spreadsheets

  1. Justin Heidenreich

    Hi Karl, thanks for building this script – works awesome! Can’t believe this functionality is not a default in google docs by now. Would you be willing to share the code for this? I am interested in modifying the script to run automatically each day, performing a delete/shift on specified cells.

    Best,

    Justin

    Reply
  2. Justin Heidenreich

    “Right now, you need to copy the code from github and paste it into the Script Editor in Google Spreadsheets (see the Tools menu).”

    Doh, didn’t read that far into your post…haha. Thanks for sharing.

    Reply
  3. Dan Lee

    Thanks for the app! Insert/Delete cells is sorely lacking in google sheets. On one of my sheets I deleted cells shifting them up and the sum in the cell under them did not update for the end of the range. Is this a feature that may be added to the add-on?

    Reply
    1. karl.kranich Post author

      Dan,
      Thanks for the feedback! Others have requested formula updating, and it’s just beyond my skill level at this time. I’ll try to figure it out some time.

      Karl

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *