Is there a way to use conditional formatting to change the whole color of a row besides a cell that you want another color?
For example: I want the whole row that says "scheduled" to be purple except two cells, one that states "not Submitted" and another that says "pending". I would like those two cells to be different colors.
Just wondering if there is some magical formula that will let me color the whole row minus cells that contain "...". and let me format those rows that contain "..." like I had before with the "text says exactly" rule.
You can set up three custom formulae, and arrange them so that the "not Submitted" and "pending" columns are evaluated first. For example:
=$B1="not Submitted" applied to range B:B
=$C1="pending" applied to range C:C
=$A1="scheduled" applied to range 1:1000 with purple background
See it working in this example sheet: https://goo.gl/bFJ8bu
Related
I have a timetable style sheet that has values filled in rows on particular dates. I would like to be able to automatically have the row background colour change up to the last filled value, so you can easily scan down the sheet visually to see longest time since etc.
Image below to illustrate what I mean: the dark backgrounds I have created manually, this is what I would like to auto fill using conditional formatting:
Something like this would do:
=AND(A1 = "", COUNTA(B1:1) > 0)
1st condition to color only empty cells, 2nd to color if there's something further.
Try the following under Custom formula is
=COLUMN(A1)<INDEX(MAX(COLUMN(A1:1)*(--(A1:1<>""))))
I'm trying to make something like this: https://productivityspot.com/search-in-google-sheets/
But in my case, "search cell" and cells that need to be highlighted are in the different sheets.
And I need to be able to search for multiple strings, not just one.
So, here is the exact problem:
The table is located in a sheet called "Tabela"
City names are in cells C4, C5, C6, etc.
I need to type city names in another sheet called "Filter" in cells AP5, AP6, AP7, etc., and in cells AQ5, AQ6, AQ7, etc.
When in sheet "Filter" I write "Tuzla" in cell AP5 and "Lukavac" in cell AP6, I need every "Tuzla" and every "Lukavac" in the sheet "Tabela" in C4 and below to be highlighted with red.
And when I do that in cells AQ5, AQ6, etc., I need them highlighted in green.
So, cities entered in AP column should be highlighted red, and cities entered in AQ should be highlighted green. And if the same city is entered in both the AP and AQ column, some kind of warning would be nice.
Solution:
You can use INDIRECT function in your conditional formatting custom formulas to highlight cells based on values from different sheet:
In your sample, you would need three rules:
Highlight Cells Red:
Custom Formula: =COUNTIF(INDIRECT("Filter!$AP5:$AP"), $C4)>0
Highlight Cells Green:
Custom Formula: =COUNTIF(INDIRECT("Filter!$AQ5:$AQ"), $C4)>0
For the warning, you can turn the cells a different color (I'll use gray). This rule should be on the top.
Custom Formula: =COUNTIF(INDIRECT("Filter!$AP5:$AQ"), $C4)>0
Sample Sheet:
References:
INDIRECT()
Conditional Formatting from another sheet
First condition: Give a strike-through to the list when checkbox is True.
Second condition: Highlight every 3 rows for readability.
The problem is that I want the first condition to give only strikes, but it also change the background color. I don't want to change the background color.
Answer:
Google Sheets doesn't allow you prioritise conditional formatting statements, but you can achieve this by modifying and adding a third rule.
More Information:
At the moment, you have two conditional formatting rules:
The one which colours every three rows, set on the rows of the sheet:
=AND(MOD(ROW() ,6)>0,MOD(ROW() ,6)<4)
And the one which sets the text in column B to strikeout if the respective checkbox in column A is checked, set on column B:
=A1:A=TRUE
The problem is that the strikeout rule will not ignore the other conditional rules, and so will not honour the first rule which sets the row colour.
Fix:
Firstly, you can keep the formula which colours the rows:
=AND(MOD(ROW() ,6)>0,MOD(ROW() ,6)<4)
Making sure that the Formatting style is only for the row colour.
You will then need to have two additional rules which keep both the formatting of the colour, as well as the strikeout:
The first, will affect rows 1-3, 7-9, 13-15 etc. For this, your formatting style should be the correct colour for rows 1-3, as well as the strikeout:
=AND(AND(MOD(ROW(),6)>0,MOD(ROW(),6)<4),A1:A32=TRUE)
And the second will affect rows 4-6, 10-12, 16-18 etc. For this, your formatting style should be the correct colour for rows 4-6, as well as the strikeout:
=AND(A1:A32=TRUE,OR(MOD(ROW(),6)=0,MOD(ROW(),6)>4))
Showcase:
I am trying to conditionally format a range of cells based on the value of a different cell. I have selected the range of cells, chosen "custom formula" and entered =reference cell="reference value". (see screenshot) this should make the whole range of cells purple if cell G4 equals the letter M. The problem is only the top-left cell in the range is changing color, not the whole range.
Also, I want to drag this block of cells down to repeat it, and for the conditional formatting to fill down appropriately (i.e. to reference cell G21 when I fill downwards and so on.) How do I do that?
you need to lock it down with $
try:
=$G$4="M"
or:
=G$4="M"
I'm trying to apply conditional formatting to a range of cells.
If cell 'C5' as per picture is not empty then apply colour yellow to cells C6:C12.
What I have tried changes the colour of only one cell i.e. just C6.
Please try selecting C6:C12, Format, Conditional formatting..., Format cells if..., Custom formula is:
=C$5<>""
and chose yellow, Done.
To achive that, you should select the Cells you want the conditional formatting to apply to, and then set the Formatting to "Custom formular", which should be
=$C$5<>""
The $ means, that neither the Column nor Row should advance with the target area.
So
=$G1<>""
would mean, that if your Target Area was A1:F4 (the first four cells of the first six columns), that the formatting would depend on G1 for A1:F1, on G2 for A2:F2 and so on (the Row is advancing in this example, while the column is still fixed as being G.)
You need both $ - i.e. =$C$5<>""
Just tested and works here.