Is it possible to make cells with the same content in google tables?
Those. Banana is written in cell A1; the same thing is in cell b2; if we change the word to orange in cell b2, the value changes in cell A1. And vice versa.
Is it possible to make cells with the same content in google tables?
Those. Banana is written in cell A1; the same thing is in cell b2; if we change the word to orange in cell b2, the value changes in cell A1. And vice versa.
This cannot be done through table functions. But you can through a script , for example:
function onEdit(e) { var cells1 = ["A1", "C3", "A6"]; var cells2 = ["B2", "D1", "E4"]; var value = (typeof e.value == 'object' ? "" : e.value); var sheet = e.range.getSheet(); var cell = e.range.getA1Notation(); var k = cells1.indexOf(cell); if (k != -1) { sheet.getRange(cells2[k]).setValue(value); } k = cells2.indexOf(cell); if (k != -1) { sheet.getRange(cells1[k]).setValue(value); } } Here are the lines
var cells1 = ["A1", "C3", "A6"]; var cells2 = ["B2", "D1", "E4"]; mean dependencies A1 <-> B2, C3 <-> D1, A6 <-> E4.
The script is launched after each editing of the table (this provides the name of the onEdit function), compares the address of the changed cell with those recorded above, and performs the replacement in the associated cell.
Source: https://ru.stackoverflow.com/questions/536915/
All Articles