Cell change color based on cell range - google-sheets

I am building a Google Sheets to check off vocabulary words taught during a school year. I need the cells in the first column (the vocabulary word) to change to green when taught, or red when not taught. I am recording the date taught in the adjacent row cells. For example B1 will turn red if there is no data in cells C1:AA1.
How do I do this?

Please format as much of B:B as relevant "standard" red then select B:B, clear any CF formatting from it and Format - Conditional formatting..., Custom formula is and:
=countblank(C1:AA1)<>25
Select green formatting of choice and Done.

Related

Conditional Formatting Row based on

I like to use Google Sheets to keep my list of stories that I'm working on organized
like in this photo here:
Each row is highlighted a certain color depending on the value of the cell in "B" Column. "Published" is green, "WIP" is orange, where for range A2:B2, =B2="Published"
But at the moment I have to create the conditional formatting formula (CF) for each row one by one. I have to make the CF for Row 2, then copy the CF to Row 3 and edit the formula to replace every B2 with a B3 so it works independently on the next row.
This seems far too tedious to do practically so I was wondering if there was a formula that would allow each row to be formatted individually with one formula? Something where the formula knows to look at B2 in Row 2 to apply the formatting, B3 in Row 3, and so on.
The current formula I'm using is [=B3="Published"] to change the formatting style to a green highlight. But if I do this on all of my cells, it will change all of rows based on the value of B2. Even though in B3 it might be "WIP" instead, which defeats the purpose of highlight. I was hoping it would function like [if: =BX="Published"/ then: apply conditional formatting to Row X]
I'm really sorry about the poor phrasing of this question, I have basically zero knowledge on Google Sheets and don't know how to phrase the question for Google or any other search engine
set your range to A2:F and use this set of formulae:
orange
=$B2="WIP"
blue
=$B2="Outline"
green
=$B2="Published"

How Do I Highlight a Cell a Certain Color if the values in two other cells match?

I'm trying to get a cell to highlight with a certain color if the text of two other cells match. Has anyone else done this?
Example:
If the value in the cell A2 is "Car" and the value "Car" is in a range on another sheet, can the cell B2 be filled with a color?
Assuming a range on another sheet is ColumnC of Sheet2, then select B2, apply the Conditional Formatting custom formula:
=match(A2,indirect("Sheet2!C:C"),0)
and certain colour fill.
This can be achieved using conditional formatting.
Select the cell (B2 in your example) and in the menu bar go to Format > Conditional Formatting...
Here you want to use a custom formula. Specifically for your example, the formula to input would be:
=AND(A2="Car",COUNTIF(C2:C5,"Car")>0)
Note that the range that is being checked for "Car" is C2:C5, since you didn't specify any for your example.
EDIT:
Following the discussion in the comments:
=COUNTIF(Sheet2!$C:$C,A2)>0
What this does, is that it looks for the value in A2 in column C in Sheet2 and if it occurs once or more, the cell that you have applied this conditional formatting to, will be coloured.

Conditional Formatting Rows With Date Formula

I am trying to conditional format a date range within a sheet. I can conditionally format the cell easily, but can't figure out how to do the entire row. Here is the formula I am using.
=$C:$C=Today()-30
The formula is not incorrect based on what google says, but the cell will go from red back to white.
To apply conditional formatting with a custom formula to a range, write the formula for the cell in the upper left corner of the range. It will be correctly adjusted for other cells, using relative/absolute references in your formula.
In the specific case, the formula should be =C1 = Today()- 30 (if the range you are formatting has C1 as upper left corner).
Please select the columns that comprise "one row" and then Format, Conditional formatting..., Custom formula is:
=$C1=today()-30
select your formatting and Done. (The $ is required if to apply formatting to more than one cell in this way.)
Since "30 days ago or more" is a much more common requirement than just "30 days ago" you might want to consider =$C1<=today()-30.

Conditionally format Google Sheets cell based on text in a different cell

I would like to format cell D2 based on text in C2. I would like D2 to be colored Red if C2 contains text from a drop down of "No" and be colored Green if the text is "Yes". I have tried custom formula containing =IF C2 ("Yes") which Google Sheets seems to accept but he result is not displayed at all.
Select D2 (or D2:D9 or D2:<somewhere further down>)
Choose Format ► Conditional Formatting
Format cells if... Custom formula is...        =C2="yes"
Formatting style - choose a green Fill and click Done.
Add new rule then repeat from step 3 with `=C2="no" and a red Fill.
        
Edit: Actually, if the cell is to have a background of white for anything other than "Yes", then you only need one rule: =C2="Yes" That is, if the default background for the entire sheet is white.
You must add two separate rules to cell D2, one for each color. The formula must look like this:
=$C$2="Yes"
And for anything other than "Yes"
=$C$2<>"Yes"

Conditional Formatting from another sheet

I'm trying to have a cell on Sheet A check if it's either > or < the value in a cell on Sheet B, then change its color accordingly. Under the custom formula I use: =A1>("SheetB!A1"), but it doesn't seem to work. I use the color Green for the > and the color Red for the <. Every time the rules are saved it will always display A1 on Sheet A in red.
Is the function wrong? Or is it not possible to have a Conditional Format even search across sheets?
For some reason (I confess I don't really know why) a custom formula in conditional formatting does not directly support cross-sheet references.
But cross-sheet references are supported INDIRECT-ly:
=A1>INDIRECT("SheetB!A1")
or if you want to compare A1:B10 on SheetA with A1:B10 on SheetB, then use:
=A1>INDIRECT("SheetB!A1:B10")
=A1>INDIRECT("SheetB!"&CELL("address",A1))
applied to range A1:B10.
You can do this by referencing the cell and row number in the current sheet, so as you drag-copy that conditional formatting to other rows it will reference the correct cells.
In the below equation I am coloring cells based on the exact same cell in some other sheet named "otherSheetName" in this example. If for example you want to color cell B2 in Sheet2 if the cell B2 in otherSheetName contains the text "I Like Dogs" you would go to cell Sheet2!B2 , click condition formatting, choose equation from the drop down and paste the below equation.
=IF(INDIRECT("otherSheetName!"&ADDRESS(ROW();COLUMN()))="I Like Dogs";1;0)
Comparing strings instead of numbers for a conditional formatting rule, you can use:
=EXACT(A1,(INDIRECT("Sheet2!A1")))
Case sensitive.
There is one trick/bug: if you have conditional formatting in Sheet1 that explicitly references itself (e.g., the formula is Sheet1!$C$2), you can copy the conditional formatting to Sheet2 with Paste special > conditional formatting and it will "work"... as long as you don't touch anything:
if you try to edit the conditional formatting in Sheet2, then you'll get an "Invalid formula" error.
if columns/rows change in Sheet1 such that they affect the conditional formatting (e.g., row/column inserts), this is not reflected in Sheet2 (keep in mind that the indirect trick mentioned by #AdamL will also not reflect column/row updates either, so it's a wash in this respect).
I was able to compare two sheet and highlight the differences on the second sheet using conditional formatting :
=A1<>(INDIRECT("Sheet1!"&Address(Row(),Column(),)))

Resources