how to shift cells down in specified columns?

I think you should have onEdit function somewhere there and this is where you could specify a condition to check only for changes in a specific column:

function onEdit(e) {
  if (e.range.getColumn() === 3) {
      var ss = e.source; 
      var sheet = ss.getSheets()[0];
      var range = sheet.getRange(3,1).insertCells(SpreadsheetApp.Dimension.ROWS);

What happens here:

  • onEdit function runs when any cell in your spreadsheet is edited
  • it receives e object as an argument, this object has a reference of which cell was edited (e.range)
  • you can check in which column/row the edit was made by using e.range.getColumn()/e.range.getRow() in an if condition

More to read:

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top