Aaron Chai
Aaron Chai

Reputation: 3

Looking for Solution in google sheets

Hi helpful and professional people of Stack overflow. I seek help for a solution for a attendance marking spread sheet.

So I have made a column of 10 rows with check boxes within each cell.

How should proceed to allow(or is it possible) for the following to happen:

  1. When the checkbox is ticked( cell value = true ), the cell beside it on the right will be greyed out in colour.
  2. When the checkbox is not ticked( cell value = false ), the cell beside it on the right will come out with a dropdown list to choose some options.

Thank you in advance if there is a solution for this.

Upvotes: 0

Views: 31

Answers (1)

doubleunary
doubleunary

Reputation: 19030

Assuming that your checkboxes are in column C and drop-down lists in column D, use conditional formatting in column D to solve the first question. You would need a custom formula rule like =C2 where C2 refers to the topmost checkbox cell.

The easiest way to handle the drop-down lists would be to let them always sit in place, and trust that graying out is sufficient to show the user that a drop-down list is currently not available.

If that is not a viable solution for you, use an onEdit(e) function to create a drop-down list dynamically when a checkbox is ticked, and remove a drop-down list when a checkbox is unticked. See the createDropDownList_ script for sample code.

Upvotes: 2

Related Questions