how to catch edited cells range with onEdit(e) trigger when filter applied

44 Views Asked by At

Imagine we have a sheet with a table and with filter applied (see linked example https://docs.google.com/spreadsheets/d/1wPE3bufOyWt9MdB6yt7HK9d1AB5GbzGcXx0GIf-M4nA/edit#gid=0). I have filtered rows in column A by selecting only one category "Field-1". Next I want to edit cells in columns B, C, D as bulk one step edit by doing:

  • Ctrl+C of data from B2:D2
  • Ctrl+V to cells in columns B, C, D for all rows filtered by "Field-1".

With onEdit(e) I expect to catch the range of edited cells, but in fact my range is partitioned into subranges by hidden rows so getA1Notation() generates one row only as a result: B4:D4 in our example (see Logger.log outputs). It does not catch other rows (B6:D6, B8:D8, B10:D10).

Is there a way to obtain the list of all cells affected by such bulk edit operation or at least first and last row of affected range?

0

There are 0 best solutions below