Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Spreadsheet: Set a default value to all the cells in a column with/with out script

I am looking for a way to set a default value to a cell in a spreadsheet?

Any Ideas?

like image 208
shannoga Avatar asked Sep 05 '25 01:09

shannoga


1 Answers

Not sure what you´re after. Can you try to clarify what you want to do?

If you go to Tools/Script editor and enter the following code, the cells A2 through A11 will be set to 42 when any cell is edited:

function onEdit(event) {
  var sheet = SpreadsheetApp.getActiveSheet();
  sheet.getRange(2, 1, 10).setValue(42);
}
like image 167
Henrik Avatar answered Sep 07 '25 16:09

Henrik