google sheet – 15 30 45 .. 820 borderline macro

function border_151() {
  var spreadsheet = SpreadsheetApp.getActive();

  // Define the starting and ending row numbers (15 and 820).
  var startRow = 15;
  var endRow = 820;

  // Loop through rows in increments of 15 and set the border.
  for (var row = startRow; row <= endRow; row += 15) {
    spreadsheet.getRange('A' + row + ':B' + row).setBorder(null, null, true, null, null, null, '#000000', SpreadsheetApp.BorderStyle.SOLID);
  }
}

Leave a Reply

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