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:
When the checkbox is ticked( cell value = true ), the cell beside it on the right will be greyed out in colour.
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.
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.
Related
I have a horizontal bar chart where one of the bars on the chart needs to be dynamic based on a user selection of checkboxes in a google sheet. I can get this to work with one checkbox "=IF(C5=TRUE,D5+100,100)" but not sure how to get to work when multiple check boxes are selected.
enter image description here
I have a "Base UPH" of 100 and just need to add the values in the "Multiplier" column if the checkbox(s) are TRUE. The idea is that the user could select one or all of the checkboxes and see how the "C-Dynamic" would be improved.
Any tips, much appreciated Thanks!
Able to get to work, but only for a single checkbox with this formula: =IF(C5=TRUE,D5+100,100)
You could do it with SUMIF, like this:
=100+SUMIF(C5:C8,TRUE,D5:D8)
I was wondering if someone could help me create a drop-down list in a single cell on google sheets that only displays the months names but also keeps their values
Until now I’ve been able to create the list but when I go to select the month it changes into day-month-year form
Thank you,
Gabe
The way i understood your question, the easiest way to do it would be to just use data validaion: Select cell you want and in toolbar menu go Data>Data Validation>List of items and just paste this January,February,March,April,May,june,July,August,September,October,November,December
Then format cell as plain text: Select cell you want and in toolbar menu go Format>Number>Plain Text
Hope this is what you need.
image <- I have a google sheet like in the photo. When I check the box behind the cars here, the name of that car is written in the result section. I want that when I tick one of the two checkboxes, the other will not be checked. That is, only one of the two checkboxes should be selected at a time. When one is selected, the other should not be selected. How can I solve this with google sheets formulas without writing app script code?
image2 <- The formula in cell D2:
=IFS(COUNTIF(A2, TRUE),B2,COUNTIF(A3, TRUE),B3,COUNTIF(A2, False),"",COUNTIF(A3, False),"")
One checked checkbox at a time (similar to a radio button behavior) isn't actually supported in Google Sheets at the moment.
However, there are certain ways to circumvent this kind of issue. It can be via Apps Script or Sheets itself.
Since you are looking for a Sheets related solution, an alternative would be using an in-cell dropdown instead of checkboxes. That way, you could only select just one car at a time and you don't need complex formula to get the chosen value itself, you just need to set the cell formula to =B2 to get the dropdown chosen value.
Sample:
To add a dropdown in Sheets, see the reference below:
Reference:
Drop-down List
To be more specific, I want the Conditional Formatting to check the content of the cell that is currently being formatted and be dynamic as I copy-paste the Conditional Formatting into another cell, without having to manually fiddle with the formula again.
So what I'm doing is this (using an example):
I have a list of foods categorized by type (Fruits, vegetables, etc...) and every week the list changes, so its not possible to add "hard values" to formulas, it has to be a cell reference under the category.
Which means that under the category "fruits" for example, in week 1 i can have: banana, apple and peach but totally different fruits another week.
Anyways, I also want to create a calendar with the days in the week, where I put 4 drop-down menus which correspond to the 4 types of food. The drop down menus update as I update the initial list of avaiable foods.
Now down to the real issue.
I want that the cell used for the drop down menu to take an specific color when the content of that cell contains a food inside a given category.
For example, I select Apple, it checks for the apple and applies the apple color to the cell.
I acheived this with this
=COUNTIF(A4:A6, INDIRECT("RC","FALSE"))
I found someone online using the INDIRECT("RC","FALSE") value to "reference" the current cell but its not working for me...
A4:A6 is the range of fruits and it will give the red color to the apple because i defined it in Conditionnal formatting.
Now when I copy the conditional formatting is not working for the other apples and I want to make it work for others, just by checking if the current cell contains a value in a range of cells, without manually changing the current cell for every cell.
https://docs.google.com/spreadsheets/d/15trOcNzucTJDDwuseQTsvjhioIGN9W4NEjhztmMZ1so/edit#gid=0
This is my google spreadsheet, please help ! I'm not sure if I can understand better. This is for a much bigger project and really need the help.
Current cell for conditional formatting is left top most cell in Apply to range range.
In your case it is D11. So you should use following formula:
=COUNTIF($A$4:$A$6, D11)
I'm working on a spreadsheet in Google Sheets for multiple people, and indicate in a column who the person the information on that row pertains to. I want to format cells on that column, only when they're not empty, based on what person is selected in another cell.
I can create functions to format things based on another cell's entry, but I don't know how to compound that with a function for not being empty. Sorry if this is super basic, I just can't figure it out.
Yep. This is a super simple thing to do.
1) Highlight the column where the person's name appears.
2) From the main menu, select Format, Conditional formatting.
3) In the sidebar click add a new rule. what you want to do is create one rule for each name that appears (or could appear) in that column.
4) Under "Format cells if, select "Text is exactly"
5) Type the name in the cell where it says Value or Formula
6) Choose a background colour to suit.
7) Click Done.
8) Repeat steps 3 to 7 for each person; but change the background colour in each case.
Here's an example.