Google sheets Conditional Formatting not applying to whole range - google-sheets

I've got a Sheet.
And I've put some conditional formatting in it.
Basically I want it to highlight the row red of the end column says Not Built
The condition works fine, but for some reason instead of highlighting the whole row, it only highlights the first column.
In My screenshot i've set the range as L7:N (it's Actually A7:N, but I changed it to L to fit in the screenshot)
As you can see it's highlighting the rows where column O says Not Built but for some reason it's only highlighting Column L instead of Columns L to N
I Could create a rule for each Column, but that just seems silly

you need to lock the formula with $ like:
=$O$7:$O="Not Built"

Related

Conditionnal formatting in two columns

I am looking for information about conditional formatting in Google Sheets. I would like to put the cell in column L in red if it exists twice AND if the data in the same row in column K is the same.
By searching on the internet, I found how to put the cell in red if it exists more than once but I don't see how to add in addition a check on the K column ( =NB.SI($L2:$L;$L2)>1 ).
Below is a screenshot of my Sheets file.
You can see that the cells turn red and the data in the K columns are different.
Could you help me with this please? I am not comfortable with conditional formatting at all.
Try this formula in conditional formatting setting
=if(COUNTIF(L:L,L1)>1,countif(K:K,K1)>1)

IF and REGEXMATCH formula excluding RR in a column but select for letters K-Z

So, I have a formula graciously shared by someone here that works amazing in highlighting cells in a column that contains letters from K to Z, excluding RR. Here it is below...
=REGEXMATCH(E5:E,"[K-Z]")*(REGEXMATCH(E5:E,"RR")=FALSE)
But, I'm trying to accomplish the same thing with an IF formula (not conditional formatting), where if a cell in column E contains a letter from K-Z, it will display the green checkbox, and if not, display the red down arrow. I'm not sure exactly how to exclude RR again in the equation. Here's the formula I'm trying to get to work...
={"OL";ARRAYFORMULA(IF(E5:E="",,if(REGEXMATCH(E5:E,"K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z"),"✅","🔻")))}
The formula works except it includes cells containing RR, I guess because R is in there? But I want to exclude cells containing RR.
Here's a Google Sheet that contains the formula I'm currently using.
Thanks for any help you can provide.
I left a new sheet ("Erik Help") with a formula in B1 that somewhat follows the form of your original formula there, since that seems to be something you understand. All I did was add another outer IF to rule out instances of "RR" up front:
={"OL";ARRAYFORMULA(IF(A2:A="",,IF(A2:A="RR","🔻",IF(REGEXMATCH(A2:A,"[K-Z]"),"✅","🔻"))))}
use:
={"OL"; INDEX(IF(
REGEXMATCH(E5:E,"[K-Z]")*(REGEXMATCH(E5:E,"RR")=FALSE),
"✅", "🔻"))}

How to apply formulas in rows with unknown no of columns?

This works:
This does not:
I don't know why.
EDIT:
Thanks to Marios this works:
=ARRAYFORMULA( IF(B5:5 = "Start","",IF(
B6:6-A6:6>-1,B6:6-A6:6,0)))
"Start" to be changed to a named range with the actual date at the top of the sheet.
Explanation:
You are trying to execute this formula:
=ARRAYFORMULA(C6:6-B6:6)
in cell C7.
The issue with that is this part B6:6. This is a range of columns starting from B until the last column in your sheet, but since you put that formula in cell C7 your starting point is column C.
Essentially, you want to put the range of values from column B until the last column of the sheet but your available space is from C until the last column of the sheet and therefore you lack 1 column as the error also suggests.
An analogy would be:
fit a big box inside of a smaller one with a size difference of one column. In this case the big box is the range of B6:6 and you are trying to put it in a smaller box of a range C6:6.
Solution:
Try to put that formula on cell B7 and it will work. Don't drag it, because the big range will shift to column A and you will face the same issue. Just use the same exact formula on cell B7:
=ARRAYFORMULA(C6:6-B6:6)
While this might not be your goal, it explains what is the current issue you are facing and what to do in order to fix it.
Update based on your solution:
=ARRAYFORMULA(iferror(IF(B5:5 = "Start","",IF(B6:6-A6:6>-1,B6:6-A6:6,0)),""))
I added an iferror check to catch the first error value caused by the string.
You should use this:
=ARRAYFORMULA(IF(B5:5 = "Start","",IF(B6:6-A6:6>-1,B6:6-A6:6,0)))

Highlight entries in a row that do not match (with multiple instances)

I am trying to create a highlight in my sheet that will allow me on a row by row basis to highlight the version numbers that do not match the master column. I also want the rule to ignore anything that is marked as N/A as it should not be considered.
e.g. column E houses the latest version v1.0.2, columns H-O list the versions available at various locations, two of them are still on v1.0.0. I want any that do not match the master version (outdated) to highlight.
How can I do this and have it apply to each row individually? So row 7 values are highlighted based on E7 but row 8 values are highlighted based on E8. These are not plain numerical values but include text.
So I have figured it out after a bit of messing around based on answers to similar questions. All using Conditional Formatting.
Make sure that each rule created has the correct range applied so only that section of the sheet is checked (in my case H6:O18).
This ensures that whatever rule I add, it only applies to that part of my sheet.
Custom formula "=$H6:$O6<>$E6"
To explain this, it looks at the range of data entries (From the H to O columns - starting with row 6) and compares it to (in my case) the master entry in column E to compare. Basically asking do the entries differ?
The $ symbols are included in front of the column values to mark them as unchanging. The row numbers do not have the $ symbol and so can change. Therefore it checks H6:O6 against E6, but will check H12:O12 against E12. Maintaining the column but not the row.
Additional rule added "Cell is empty"
This is set to not highlight - applied to the same range (H6:O18). This is placed above the previous rule to overrule it. Therefore any blank cells are not highlighted as different, they are ignored.
Additional rule: "Text is Exactly"
This is applied to the same range and ordered above the original rule to again overrule it. The text to check is "N/A". Again this is set to not highlight or alter anything. This ensures that entries marked N/A are ignored much like blank cells.
An extra addition I included was duplicating the first formula but changing the <> to = and changing the highlight to green. This highlights anything that matches while any differences are highlighted red. N/A or blank cells are ignored.
Example of highlighted cells + Formula

Conditional Formatting with lots of data

Anyway, I have a table in Google Spreadsheets that has a set of rows which each contain a name (Column A) and two Yes or No values (Columns G and H).
I would like a way to conditionally format the rows. I have been trying to learn the formatting but I feel this is well out of my league. The way I would like it all to be formatted is only in Column A. If G says "Yes" and H is empty, then yellow. If G says "Yes" and H says "No", red. If G says "Yes" and H says "Yes", green.
If it helps, here is a chart:
G H
Y -- Yellow
Y N Red
Y Y Green
An explanation of how it all works would also be much appreciated but if you only have the solution on how to do it, I will gladly take that.
METHOD 1 - Conditional Formatting Only
The easiest way to do this, using Conditional Formatting is as follows:
Select "Format >> Conditional Formatting":
These IF statements will be used color the cells Yellow, Red, and Green, respectively.
=IF(AND(G2="Yes",H2=""),"True")
=IF(AND(G2="Yes",H2="NO"),"True")
=IF(AND(G2="Yes",H2="YES"),"True")
METHOD 2 - New Column, using f(x), and Conditional Formatting
The code used to generate the text "Yellow," "Red," and "Green" is as follows (broken up in 2 lines only for easier readability):
=IF(AND(B2="Yes",C2=""), "Yellow",IF(AND(B2="Yes",C2="No"), "Red",
IF(AND(B2="Yes",C2="Yes"), "Green")))
This is a nested IF statement that will examine your "Yes"/"No"/null column cells. This statement looks for the conditions you specified and returns either "Yellow," "Red," or "Green" in a separate column.
Since your IF statement will output either "Yellow," "Red," or "Green," all you'll have to do is set your Conditional Formatting to look for these words and color the cell accordingly.
A great resource to learn more is the Google spreadsheet function list.
I've got it for you. It can be made using the conditional formatting in Google Sheet.
A Screen Shot attached
Right click your cell A, apply conditional formatting
Just apply it across your range in column A1:A500 something
and choose the "Format cells if..." and choose custom formula
(Just click Add another rule after each one so you don't have to repeat the range)
=IF(AND(G60="Yes",H60=""),"True") //Change the color to Yellow
=IF(AND(G60="Yes",H60="No"),"True") // Change the color to red
=IF(AND(G60="Yes",H60="Yes"),"True") // Change the color to green
You will have 3 rules of conditional formating
replace G60 and H60 with the starting row number
Edit ------------------ Forgot to add the explanation
The formula
IF(AND(G60="Yes",H60=""),"True")
"IF" is to check IF something is this or not. I added the "AND" so that we could put in 2 condition, since we need both conditions to be satisfied. and therefore the formula above in written form would be
IF(IF) BOTH(AND) G60 and H60 is "Yes" and "Empty" respectively, then it is True. So it will become the color I chose.
There might be another way to write the codes but this works :)

Resources