Conditional formatting cells in range if the cell value exist in a different column - google-sheets

In Google spreadsheet, we have column A which is an input list. Other columns from B to G are filled list. Filled list cells should highlight when cell value matches with input list.
The problem is I can not use MATCH as matching is with the range not column or row.
Here is the expected result.

You definetely can use Match. But you need to use it with ISERROR & NOT formula.
You need apply the following Conditional formatting to the entire range starting from B1.
=NOT(ISERROR(MATCH(B1,$A:$A,0)))
Note: if you copy the formula exactly, you need to apply it to the Range starting from B! For it work.

Related

Conditional Formatting from cells in adjacent column

[inventory sheet] (https://docs.google.com/spreadsheets/d/1kLDo8Up_RJa2rXsEZ9ElKBEhGUTsMw61-fQspOPuBz4/edit#gid=0)
I'm trying to conditionally format column E based on column D. For example, if the value in column D is <8, highlight the adjacent cell in column E green. If value is >7 and <15, highlight yellow. If value is >14, highlight red.
The formula I have now works, but I can't figure how to apply the formatting to the entire column without manually inputting 3+ conditional format rules on each individual cell.
The existing conditional format from your sheet is partially correct, it just needs some tweaking on the Apply to range value. You can create 3 conditional formats on E3 and it will apply to the whole column of E if you put the E3:E on range.
Please see the 3 conditional formats I have created based from your given sheet.
Conditional format 1:
Conditional format 2:
Conditional format 3:
Output:
Reference:
AND function
Just select the whole range and create one single rule per condition. Use the formula as it is created for the first cell and it will "drag" automatically.
For example with =D2>15

How to conditional format each row of a column based on corresponding value in another column

Please refer the image
I want the cell to be highlighted based on the value is less than or greater than the value in the benchmark column. I am not able to do that using conditional formatting custom formula. I have manually applied formatting for 02/01/2023 . I want the formatting to apply to the column with date = today() only.
Thanks :)
I can write a custom formula for each row of each date column. But is there any way a single custom formula that could format across rows and columns?
I'm guessing your fist value of 02/01/2023 and Activity1 is C2. Then for the whole range C2:Z (or whichever you have):
=C2>=$B2
Do this for one color for the whole range and it will drag automatically, you don't need to write it as an arrayformula. The "$" will always refer to the value in column B from the row it's positioned
if you are selecting whole range (C2:Z), try this for green and red respectively:
=(C2>=$B2)*(C2<>"")
=(C2<$B2)*(C2<>"")

Conditional formatting based on adjacent cell value even when the first adjacent cell in row is blank

I would like to colour cell C3 red, as the value is less than the next filled cell on row 3 (E3).
You need custom formula in the formatting rules for range C2:W.
And you can use the formula below for green:
=and(not(isblank(C2)),C2>index(filter(D2:$W2,arrayformula(not(isblank(D2:$W2))))),1,1)
And make another conditional formatting rule with the same range and change > accordingly for red.
Note that the equal case does not have formatting in your example.
To understand why, there are a few components at work. I'll give an outline in case OP or any passer-by wants one.
First is how conditional formatting in Google Sheet works. I will be brief here. The range we put in the rule is C2:W. Google Sheet will use the beginning cell in that range as a reference. For C2:W, the 1st cell is C2. In the formula, the cells are read in terms of relative position to that reference cell. So when evaluating formatting for cell C2, it treats the formula as is. But, for example, when evaluating formatting for cell C3, Google Sheet iterates all non-fixed ranges by 1 row. Another example: for D3, all non-fixed ranges are iterated by 1 row and 1 column.
Whenever the formula evaluates to true, the format will be applied -- although that is subject to further formatting if you have subsequent formatting rules which apply to the given cell.
Next are the components of the conditional formula.
not(isblank(C2)) checks for blank cells and makes the whole formula only true when the cell is non-blank.
For filter() usage, please consult official documentation. I will explain how filter() is applied to your example.
In our use, we are trying to rid of empty cells in the range that is on the same row as the cell in question and goes from the next column to column W. (I am using column W because there is no known end column in your image. Please adjust to your application accordingly.) Same row as C2 means row 2. Hence the digit 2 in D2:$W2. No $ sign for row because row index is meant to iterate through our range C2:W in the formatting rule. No $ sign for D because we mean 1 column next to the cell in question and the exact column index should iterate. We fix column W because the end column does not evolve and is thus not meant to iterate. Neglecting this will not particularly change the result in your example. However, it is good to be clear with the meanings.
arrayformula(not(isblank(D2:$W2))) produces a local row array whose cells are true/false that each represents whether the corresponding cell is non-blank. filter() in turn only keeps cells from D2:$W2 for cells in arrayformula(not(isblank(D2:$W2))) that are true.
We only care about the 1st non-blank cell. To retrieve the 1st cell from a (local) array, we use index(...,1,1). (That said, omitting index() also happens to work for the 1st cell in particular because when comparing a single cell with > or < to an array range, only the 1st cell of the array is used.)
Apply a conditional formatting to the range desired (starting from cell C2) using this formula:
=IF(C2="",FALSE,OFFSET(C2,0,AGGREGATE(15,6,(COLUMN(D2:W2)-COLUMN(D2)+1)/(D2:W2<>""),1))>C2)

Conditional Formatting on column based on other column value

I am trying to build a simple conditional formatting that will allow me color a cell value if its value is below another cell's value in the same row.
For example -
As we can see, In Rows 2 and 5 the value of column B was lower than the value of column A and therefore it turned green.
I understand how to do a static conditional analysis such as this one:
However my goal is to apply this on the entire column and not row by row.
in Apply to range put:
B2:B
under Format cells if... select
custom formula
and in field type in:
=B2<A2

google sheet conditional formatting for grading

On my google sheet for its form, I have the answers in Row 2.
There are 109 columns in which I need to check if the descending rows of each column match the contents of Row 2 of that column. On top of that, I have to have conditional formatting for the cells that DO NOT match the contents of Row 2 in their respective column.
Is there a way that I don't have to add a formula to each any every column?
You can do this with conditional formatting - for the "apply to range" section (pretending your data starts in column A and ends in D, although in reality you will put whatever the last column is) enter in
A2:D
then for the rule, choose custom formula and enter in this exact formula:
=if(eq(indirect(address(row(),COLUMN(),4)),indirect(ADDRESS(2,column(),2)))=TRUE,FALSE,TRUE)
This will dynamically highlight all of the answers that do not match the value in row 2

Resources