79376253

Date: 2025-01-22 00:28:58
Score: 0.5
Natty:
Report link

Do you mean that you want to check the value of cell A1 in each sheet and inset a column if it's not blank?

function main(workbook: ExcelScript.Workbook) {
    let sheets = workbook.getWorksheets();

    sheets.forEach(sheet => {
        let cellValue = sheet.getRange("A1").getValue();

        if (cellValue === "") {
            sheet.getRange("A1").getEntireColumn().insert(ExcelScript.InsertShiftDirection.right);
        }
    });
}
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: Michal