Conditional formatting with multiple cells in Google sheets - google-sheets

I am working on a spread sheet where I have a date in cell a4 and a drop down list in g4. I would like to do conditional formatting where the date in a4 reaches 6 months or older, it turns color based on g4 cell says "B-List", and stays that color until the date is less than 6 months. G4 will only have " A- List" or "B-List", and the format will only apply to "B-List" and a date that is 6 months or greater than today's date. I would like to put the conditional format in a4 if possible Thanks in advance Kevin.

Try below formula in conditional formatting.
=AND((TODAY()-A4)>=60,G4="B-List")

Related

change cell color based on number of days between two dates with google sheets

With Google Sheets I need to change the cell color according to the difference between the two dates. I need to do this according to today's date. I get today's date with the =TODAY() code. I write the date of 20 days ago in the cell. If the difference is more than 20 days, I want to make it red.
How can I do this?
in conditional formatting choose a custom formula and use:
=(TODAY()-A1)>20

How can I set a cell to highlight after X hours have passed in Google Sheets

I have a Google Sheet where a column is filled with times in a 24 hour format (XX:xx), how can I select a cell to highlight red after 3 hours have passed with conditional formatting?
I've been trying to mess with the Now() command in custom formulas for like 2 hours now, but I can't seem to get it to work. PLZ HELP!
To Highlight cells if exactly 3 hours 03:00:00.000 have been passed you need to paste this formula in format>conditional formating. > format cell if - Custom Formula, take a look at the example in this sheet.
=ArrayFormula(IF(A3:A="",,IF(A3:A-NOW()>0.13,"True","False") ))
A3:A-NOW()>0.13 to check if the date in the range A3:A minus NOW() is greater than 0.13 which represent an hour 03:00:00.000 as a number.
To check and highlight cells when certain duration have been passed and be able to adjust the duration from a cell you need to paste this formula in cell B2 to get True or False output.
=ArrayFormula(IF(A2:A="",,IF(A2:A-NOW()>$E$2,"True","False")))
It can be used as a formula in format>conditional formating.
take a look at the example in this sheet.
the columns highlighted in blue is for demonstration it can be deleted.
For anyone who has the same issue, it has been solved. Looks like the Now() call requires both the time and date to be inside the cell in order to work.
The formula I used to highlight cells that are older than 3 hours is
=(Now()-TIME(3,0,0))
A friend also showed me a different formula that seems to do the same thing
=IF(NOW()>A2+3/24,TRUE(),FALSE())
You can change the time by changing the (3,0,0) to Hrs,Min,Sec of your choosing, for the second formula, you can change it by adjusting the fraction value (3/24 for 3 hours, etc)
These will only work if you have the date and time in the cells you are formatting (e.g. If you timestamp with Ctrl+Alt+Shift+;) it will not work if you timestamp with just the time (Ctrl+Alt+Shift) as that seems to set the year to 1899 for some reason.
It would be nice if I could get these working without a date, but I have not found a way to do that.

How do I highlight cells based on the day of the week in Google Sheets?

I'm trying to highlight the cells in Google Sheets that are days of the week (text only) based on today's date.
Basically, I have a column that has M-T-W-TH-F-S-SU in it (undated, just text) and I want it to highlight the day of the week it currently is with conditional formatting or whatever. So if it's Tuesday today, Tuesday will be highlighted. Keep in mind the cell doesn't have a date in it currently, I need it to show as text. How can I do this with a simple formula or so?
=IF(TEXT(TODAY(),"ddd")=IFERROR(VLOOKUP(A1,
{{"M","Mon"};{"T","Tue"};{"W","Wed"};{"TH","Thu"};{"F","Fri"};{"S","Sat"};{"SU","Sun"}},
2,0)),1)
Please select the relevant column (A assumed) and: Format > Conditional formatting..., Format cells if... Custom formula is and:
=weekday(today())=switch(A1,"M",2,"T",3,"W",4,"TH",5,"F",6,"S",7,"SU",1,"")
with highlighting of your choice. It is little more than half the characters of the other answer.

Colour a cell based on the length of time between that date cell and another date cell

This query is in relation to Google Sheets.
If the date in B1 is 10 days older than the date in A1, then B1 is shaded red.
If the date in B1 is within 10 days of the date in A1, then B1 is shaded green.
Does anyone know how I can do this please?
We hope to use this as follows:
Record the date we submit a product.
Record a date to show we have detailed the product as suitable.
(We want this to be within 10 days of us initially submitting the product.)
Therefore we submit a product on the date in A1
We then detail the product as suitable and record this date in B1.
If we have done this within 10 days, B1 should be green. If not, it should be red. This will help us deal with delays.
Does anyone know how I can do this within Google Sheets please?
You have to use Format > Conditional Formatting for the column B, defining the range from the second row:
B2:B1000
You have to set the range this way because the formula is always evaluating in its top left corner first. So you can get the past date from row 1 and formatting the cell in row 2.
You should format your cells with custom formula like:
=DATEDIF(A1,A2,"D")>10
Your B column by default can be green.
You can check my demo sheet for this problem here.
DATEDIF:
https://support.google.com/docs/answer/6055612?hl=en
Conditional Formatting:
https://support.google.com/docs/answer/78413

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.

Resources