In a Sheet, I need to change the background color of a cell based on certain requirements. Logic:
If L2 does not have a date, then
if date in D2 is before tomorrow, have no formatting in D2,
if date in D2 is tomorrow, have yellow background in D2,
if date in D2 is today, have red background in D2.
If L2 has a date, then
have green background in D2.
This will be present through entire sheet.
I am not quite certain what you want but would be happy to adjust the following a bit to suit. First, I suggest the whole column as easier for me to explain. Select D then Format, Conditional formatting..., Apply to range D:D, Format cells if..., Custom formula is
=and(L1="",D1=today()+1)
with yellow fill, Done. Then repeat but with:
=and(L1="",D1=today())
and red fill and also with:
=$L1<>""
and green fill.
Related
I have built a simple task tracker in Google sheet.
There is column B handling the status (In progress, Done) and Due date column C.
I have created to formulas: exact match for B that sets the color to green and date before today for C that sets the red color.
The problem is that they work independently. Red color is displayed for C even when B is Done.
And each rule highlights different column.
Text is exactly Done
Date is before =today()
How to make the date formatter ignore the past dues when the task status is set to Done?
You mentioned
exact match for B that sets the color to green and
date before today for C that sets the red color
Try the following formula under Custom formula is
=AND(C3<TODAY(),B3<>"Done", C3<>"")
(Do adjust ranges to your needs)
I have two spreadsheets (S1 and S2). I want to apply conditional formatting to column D from S1 such that:
if text from cell D1, D2,... from S1 is present in column A from S2, a cell is colored green
if text from cell D1, D2,... from S1 is not present in column A from S2, a cell is colored red
Could not get my mind around it, could you please help? I assume I must use a formula, but not sure how...
Select S1!D:D and (i) apply 'standard' red fill, (ii) Format > Conditional formatting..., Format cells if... Custom formula is and:
=match(D1,indirect("S2!A:A"),)
with green highlighting and Done.
you may wanna check this answer: https://stackoverflow.com/a/54910481/5632629
and to reference another sheet in conditional formatting you will need to use INDIRECT() - https://webapps.stackexchange.com/a/126045/186471
I need to format A1 when
B1 is empty and A1 is lower than today
A1 is a date, like a deadline that I will print red if the deadline is not reached. B1 is the cell used to say it was done.
Go to conditional formatting and use the custom formula =and(A1<today(),B1="")
You can set the background color red there too.
EDIT: to extend the formatting down the column but not beyond where you have date, you can do apply to range A:A and amend the formula to =and(isDate(A1),A1<today(),B1="")
Here is a picture
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.
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"