Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onEdit() {
- let ss = SpreadsheetApp.getActiveSpreadsheet();
- let sw = ss.getSheetByName("Лист2");
- let activeCell = sw.getActiveCell().getRow();
- let button = sw.getRange(1, 2, sw.getLastRow(), 1).getValues();
- for(let i = 1; i <= button.length; i++){
- if(i !== activeCell){
- sw.getRange(i, 2).setValue("false")
- }
- }
- }
- function onSelectionChange() {
- let ss = SpreadsheetApp.getActiveSpreadsheet();
- let sw = ss.getSheetByName("Лист2");
- let activeCell = sw.getActiveCell().getRow();
- let button = sw.getRange(1, 2, sw.getLastRow(), 1);
- let radioButton = new Array(sw.getLastRow());
- radioButton.fill(["🔳"]);
- radioButton.splice(activeCell-1, 1,["🔘"])
- button.setValues(radioButton)
- }
Add Comment
Please, Sign In to add comment