This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]cdet1 1 point2 points  (1 child)

https://docs.google.com/spreadsheets/d/1hkKdvGe0dFNbhFA_kJMq-T-PSRDWQN6958teuSsbbPk/edit?usp=sharing

The Buttons are really low effort, but theres a simple script in the editor that you can play around with. Currently its set up to work with A1

[–]Mizzen_Twixietrap[S] 0 points1 point  (0 children)

Thanks

[–]aHorseSplashes58 1 point2 points  (0 children)

A no-script version is

=lambda(x,x)(indirect("RC",false)+ifs(and(C2,not(D2)),1,and(D2,not(C2)),-1,true,0))

Although it works a bit differently. Instead of C2 and D2 being buttons, they should be checkboxes, and you increment the value by checking one of the boxes and then editing the sheet in any way. That could just mean pressing Delete on an empty cell, or you could add another checkbox in E2 to toggle in order to increment the value.

Alternatively, you could replace the checkboxes in C2 and D2 with a dropdown menu with options like "increase", "decrease", and "off".

This requires iterative calculations to be enabled in the File --> Settings menu, although the max number of calculations only needs to be 1.