let sheetName = "Лист1";
let rangeNames = ["a1:a6", "c4:d5"];
let sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);
rangeNames.forEach(rangeName=>
let range = sheet.getRange(rangeName);
let data = range.getValues()
.map(row=>row.map(properFirst));
range.setValues(data);
};