Posted 25 September 2021, 7:07 am EST - Updated 3 October 2022, 9:37 am EST
Greetings,
I would like to ask about setting an active cell in selection since i couldn’t find it anywhere. I’ve implemented this custom functionality that works with the shortcut ctrl/command + shift + directional arrow key in excel or google sheets (you can try it out). What it does, it selects the nearest non-empty cell value all the way from the initial selected cell or selected area.
My huge problem is that i’m unable to set the active cell to the initial selected cell and it keeps hopping all over the place. There should be some trick with clearSelection() and repaint() but i’ve got no idea how to do this.
Example shown on the images.
PS: This problem of course happens only when i’m going “backwards” meaning to left and up direction.



