Answer the question
In order to leave comments, you need to log in
Is it possible to make a button in a cell that will have three states (0, 1, 2) - state change when pressed?
Is it possible to make a button in a cell that will have three states (0, 1, 2) - state change when pressed?
For example: the default button color is white. When pressed once, the color changes, for example, to yellow. The next time you press it, the color changes to red. How can this be done in Google Sheets?
Answer the question
In order to leave comments, you need to log in
No, but.
1. You cannot create buttons inside cells, picture buttons are embedded on top of the table.
2. You do not have the ability to manipulate the color of the drawings with the script.
Possible Solution.
1. Create a button with a transparent background.
2. Fill in the cell with the desired color.
3. Place the button exactly above the cell.
4. Create a script that will call the cache service to update the state.
5. Assign a script to the button that will change the state and color.
or
4. Create a script that will save the state in the cell with the text color the same as the background color.
5. Create conditional formatting for this cell.
6. Assign a script to change the state.
---
Maxim Stoyanov (stomaks), developer of Google Apps Script .
g-apps-script.com
stomaks.me
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question