The task is to paint over the cell in which the changes occurred.
In normal Excel, everything works with VBA code:
Option Explicit Dim vValue Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count > 1 Then Exit Sub If Target <> vValue Then Target.Interior.Color = vbRed End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then vValue = Target End Sub I tried to transfer the table to google like this (which is not right!):
function Option (Explicit){ var vValue; Private Sub Worksheet_Change(ByVal Target As Range); if(Target.Count > 1 ){ Exit Sub; } if(Target != vValue ){ Target.Interior.Color = Red; } } Private Sub Worksheet_SelectionChange(ByVal Target As Range); if(Target.Count == 1 ){ vValue = Target; } } Tell me, please, how to fix it? Is it possible to integrate the usual excel capabilities into google tables?
Link to google test table https://docs.google.com/spreadsheets/d/1HJKrhe-N6MzP0Kq-2faAK_tTAYC2khWdxrneV2gaQp4/edit?usp=sharing
Excel's working version is https://drive.google.com/file/d/1yT50byq78rT-9BbdzuCQ3eoQSwWPgF6C/view?usp=sharing