dimanche 22 septembre 2019

How do I make cells interactively change values in Google Sheets/Microsoft Excel?

Senario (you can skip this to the question part):

I have a main task A1 and 3 subtasks B1, B2 and B3. A1 is complete iff all the 3 subtasks are complete. I want to record my progress so I created a new Google spreadsheet and 4 checkboxes, 1 for each task. Then, I made A1=AND(B1,B2,B3). I tried to check all the tasks one by one and after the 3rd one is checked A1 became checked. Everything was simple and easy so far.

Later I found the main task needs to be done again periodly, so I want to reset all the checkboxes and start over. Here comes the problem. The only way for me to reset everything is to uncheck the 3 subtasks. I cannot directly check/uncheck the main taksk of course, because I explicitly set it to be a value which is decided by the values of other 3 cells.

Click the mouse 3 times may not sound like a big deal, but what if I have 10 subtasks next time? how about 100? Is there a way to allow the unchecking of A1, which can even uncheck the subtasks all at once?

Question:

I have 4 cells of checkbox, A1, B1, B2 and B3. I want the following to become true:

  1. Check. I can check any of them. If I check A1 directly, B1-3 will be automatically checked at the same time(if any of them is already checked then nothing will happen to it; only the unchecked ones change). If I check any of the subtasks(B1, B2 or B3), and if the other 2 subtasks are already checked, A1 becomes checked automatically.

  2. Uncheck. I can uncheck any of them. Similarly, if I uncheck A1 directly, B1-3 will be automatically unchecked at the same time(if any of them is already unchecked then nothing will happen to it; only the checked ones change). If I uncheck any of the subtasks(B1, B2 or B3), and if all the other cells are checked, A1 becomes unchecked automatically.

How do I do this in Google Sheets/Microsoft Excel?




Aucun commentaire:

Enregistrer un commentaire