3

I own a handful of spreadsheets with dropdown menus. Sometimes people, who are responsible for filling these spreadsheets with data, accidentally move cell with dropdown menus from one column to adjacent column. This breaks the whole process of gathering data. Can I somehow protect certain cells from moving?

Spreadsheet example: https://docs.google.com/spreadsheet/ccc?key=0AvHOD-oqzP4MdHNsSGxLaHVYZGNKUmVTaVNGS1lMVEE&pli=1#gid=0

4

1 回答 1

0

您可以编写一个事件来检查修改后的列并用其他电子表格中的原始下拉菜单替换,例如,

function onEdit(e) {
 if (e.range.getColumnIndex() == 1)
  e.range.setValues(SpreadsheetApp.getActiveSpreadsheet.getSheetByName('menu').getRange(e.range.getRowIndex(), e.range.getColumnIndex(), e.range.getNumRows(), e.range.getNumColumns() ).getValues());
}

https://developers.google.com/apps-script/understanding_events

于 2012-12-12T09:07:37.553 回答