Conditional formatting on google sheet - google-sheets

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

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.

google spreadsheet conditional formatting on a column

I have a set of data range from A to G for instance, at column G, I would like to format the cell as following
if the value of G2 is between C2 and D2, then the background color is green.
if the value of G3 is between C3 and D3, then the background color is green.
and so on for the next 500 rows
How may I do it in the latest google spreadsheet please?
Many thanks
In G2 select Conditional Formatting select custom formula and enter
=and(G2>C2,G2<D2).
Then select Apply to range and enter G2:G. It will work for all column G .
Since format the cell I assume only to apply to ColumnG. Please try selecting ColumnG and Format, Conditional formatting..., change G1: in start of Apply to range to G2: and for Format cells if... select Custom formula is and insert there:
=or(and(G2<C2;G2>D2);and(G2>C2;G2<D2))
select green fill and Done.
Change ; to , if required for your locale setting.
With text labels in Row1 it is usually simpler to select the entire column and write such a formula for Row1.

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

Formatting based on Answer

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.

Resources