Google Sheets: Highlight Entire Column if all cells equal "Yes" - google-sheets

I have a google sheet that has multiple columns that I am marking Yes or No to keep track of certain details for a property. When all cells in each column are marked as "Yes" I would like to highlight (change the background color) for that entire row. I created a sample spreadsheet of what I am trying to do.
https://docs.google.com/spreadsheets/d/1icbFXzas-VBnMsu2gjPd9avW0PN9ii3v7jPRMpp3kY4/edit?usp=sharing

Figured it out and posting it in case someone else needs it. I ended up using this conditional formula:
=AND(ARRAYFORMULA(A$2={A$3:A$37}))
It worked for all the columns. I got lucky, but would love for someone to explain why it works :-)

Related

Change cell value based on checkbox in Google sheets

I'm using Google sheet to manage my budget (see sample below) where I add each of my expenses as a single entry (yes, sounds like a lot of work). I sometimes split the expense with my roommate but then I have to add the value and divide by 2 everytime.
I was thinking if I could use a checkbox next to the value that will automatically divide the expense number by 2 when I check it. Is this possible?
I'm open to simple suggestions other than the checkbox to automatically update the value. Thank you.
Using simple IF formula you can just check if the checkbox is true, if it is then it will divide the current value on column C by 2. Otherwise it will remain blank.
Formula:
=IF(D1,C1/2,"")
Drag down to other cells.
Result:
Suggestion, Alternate solution:
If you'd like you can make a table with a column for your roommate, instead of editing the actual column so you can see both values. And use this formula:
=if(NOT(D2=""),E2/2,E2)
You have a column for per head contribution/split. If the cell on roommate is blank then it will stay as the total value, if roommate has an additional then it will be added to total and split it by 2.
Or using arrayformula:
=arrayformula(if(NOT(D2:D=""),E2:E/2,E2:E))
Works the same as above you just have to fill the enter the formula in the first cell no need to drag down and it will automatically expand to rows/cells below just make sure that below cells are empty or it will return an error.
Additional - Using same cell
As you've mentioned in the comments. Here's a way to divide the original value without using another cell to store it. (Not recommended)
Formula:
=VALUE/IF(D1,2,1)
example:
=1000/IF(D1,2,1)
Result:
However, I do not recommend this. It is still best to make use of another cell to store the original value before making calculations to it.
Also, using this formula you have to change the value from the formula and not on the cell otherwise you will replace the actual formula.
You can try array approach-
=ArrayFormula(IF(D1:D,C1:C/2,C1:C))

Conditional Formatting of Row based on multiple cells

I am trying to write a formula that will cover A3:AB311, where col f:L has checkboxes and N:AB have dates that are filled in. I want to highlight the entirety of a row if all the boxes in F:L are checked and there is text in each cell in N:AB.
Here is the formula that I have come up with but it only highlights F:L and even then just whichever ones are checked, not if all are checked.
=AND($F3:$L3 = TRUE, NOT(ISBLANK($N3:$T3)), NOT(ISBLANK($V3:$AB3)))
here is a scrubbed version of the doc that I am working with.
https://docs.google.com/spreadsheets/d/15lsA-by2vJOzp8N-_9NxLkkSmYPMAvRcVQ9Gb7KMj-Y/edit?usp=sharing
Line 31 is the only one that should be highlighted
Id really appreciate any assistance you guys could offer, ive been working on this off and on for a few days now.
You can use this formula:
=AND($F3:$L3,counta($N3:$T3)=columns($N3:$T3),counta($V3:$AB3)=columns($V3:$AB3))

A way to refer to the "Current cell" for a dynamic Conditional Formatting in Google Spreadsheets

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)

Google Sheets Conditional Formatting Issue

I am making a google sheet to track attendance for a team. I want the row with the name to highlight a specific color when a checkbox is on. I managed to write something that works for the specific row I'm working in, but any time I try to copy it over to other rows the range is just adjusted, so any time any checkbox from a column is on it highlights all the rows. Attached are pictures that show what I want it to do. I just need help figuring out how to copy this to other rows and keeping them all separated.
The code that is in each conditional formatting is this:
=$B2=True
=$C2=True
=or($D2,$E2)=True
https://docs.google.com/spreadsheets/d/1zwkuJOCBPIIoQ7cp0bV5IvidMVwdeIC0dShdjwKMSkE/edit?usp=sharing
I think the issue is with the code itself because when I copy it adds the new range, but the code stays the same.
your formulae are correct. change your range A2:E2 to A2:E - that will solve it

Google Sheets - Conditional Formating - using ISBLANK to reference a cell in a different sheet

I'm new to Google Sheets so would appreciate some assistance as my research has been unsucessful.
I have created a schedule with peoples names filling time slots. I have duplicated the sheet for the same layout to be able to create a print out that shows which time slots are available using just colours so as not to distribute the names listed. To do this I want to use conditional formating and show a colour in the cells (time slots) not yet filled.
I thought that the custom formula needs be something like... conditional formating for cell E14 on sheet "Schedule Printout"... ISBLANK('Schedule!E14') but this doesn't work.
Screen grab of the Conditional Formating dialog box
I have tried several different variations. If you have any ideas please can you let me know?
Thank you
James Webb
jameswebb.uk
See if this works
=INDIRECT("Schedule!E14")=""
I believe you have to use INDIRECT in conditional formatting when you want to reference a different sheet/tab.

Resources