Hi everyone,
I have this simple script which checks if cell F10 is higher than 0 and displays a message if it is and then sets the active cell to nothing if it occurs. (F10 is just a sum of F11:F50)
I'd like it to also do the same thing for the next column so just applying the same rules to G10, H10, I10 etc but I don't want to duplicate the block loads of times. I'm thinking there is some loop I can add here to check them all but I don't know where to start as I'm new to this.
Please can anyone help? My script up to now is below and this currently works fine for cell F10.
Many Thanks
function onEdit(e){
var sheet = SpreadsheetApp.getActiveSheet();
var getActiveCell = sheet.getActiveCell();
var getNumberCell = sheet.getRange("F10").getValue();
if (getNumberCell > 0){Browser.msgBox('value exceeded');
(getActiveCell.setValue(""));
}
}