Conditional Formatting Rows With Date Formula - google-sheets

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.

Related

Cell change color based on cell range

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.

Change the background of one google sheets column based on the date in another column

I've seen lots of answers for various other conditions under which to do this. However I can't seem to modify any of these to work for a date range. What I want is for the column color of column E to change if the date in column H is between today and 5 days from today.
I've tried varying versions of this formula: H3:H150 =today() +5 with no success
This doesn't give me the range of between now and 5 days from now but I could do multiple rules like this and just go down on each one(=today() +4, =today() +3, etc) but obviously I need this rule to work first.
Thanks!
Conditional formatting is more helpful than you seem to be expecting. Clear formatting from the column to be formatted, select it and Format, Conditional formatting..., Format cells if... Custom formula is and:
=and(H1>today(),H1<today()+6,H1<>"")
Then select fill of choice and Done.
This should format the next five days (change the angled brackets around for the past five days).
Setting the range is achieved with selection of the column to be formatted (not the one with dates in it - H). If only to apply to Rows3:150 (and in general it is a good idea, for speed of processing, to restrict the ranges to which CF is applied) then either start by selecting Rows3:150 in the column to be formatted (instead of the entire column) or adjust the Apply to range for the rule, but in either case use H3 in place of H1 in the formula above.
CF should automatically apply the rule as written to the first row in the selected range and then adjust it for the second and subsequent rows in the way copying down would adjust the formula (if at all) were it in a cell in the sheet.

Conditional Formatting cells based on how many times it appears in separate Column

https://docs.google.com/spreadsheets/d/12TsEEj3LQSIOv2m6LRRS6FCLvIkuUo_ECfQvK4gw4d8/edit?usp=sharing
I want to use conditional formatting to count the amount of times a name appears in Column H and make the corresponding name in Column B red if it shows up once and crossed out if it shows up twice.
How can I do this? I used COUNTIF but I don't know how to attach the formatting to a specific name/string in Column B so it just formats the next one on the list (I think).
Any advice or help would be greatly appreciated.
Clear any conditional formatting from ColumnB, select B3 to the end of your range to format and Format, Conditional formatting..., Format cells if... Custom formula is and
=countif(H:H,B3)=2
with strikethrough. Add another rule (same range) with Custom formula is and
=countif(H:H,B3)=1
with red fill and Done.

Google Sheets Conditional Formatting For a Column

I have a spreadsheet that has dates in row 1 and data in the rows below it. I want to highlight the entire column that has a date that is today, or within the last 7 days.
I've been searching and I keep finding examples of how to highlight a row, but not a column.
Please try selecting all cells and: Format - Conditional formatting..., Custom formula is and:
=and(A$1>today()-7,A$1<today()+1)
with highlighting of your choice. Done.
In this case the row is anchored, I agree more usual to anchor ($) the column.

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