Conditionally format one cell based on values in a column - excel

The user enters a date/time into cell B2. If this matches one of the values in column L I would like to format cell B2 as red, else format cell B2 as green.
Any idea how to do this?

Please format B2 green with standard fill, then apply the following Use a formula to determine which cells to format, Format values where this formula is true:
=match(B2,L:L,0)>0
with formatting (red) to suit and Applies to B2.

Assuming you are using Excel 2007 onwards:
Set cell shading for B2 = Green
Select Cell B2 and select the Conditional Formatting > New Rule menu item
Use a formula to determine which cells to format
In the formula bar, put in =ISNUMBER(MATCH(B2,$L$6:$L$100,0))
For format, change shading to Red
Obviously change the $L$6:$L$100 to suit you, but that should do it...

What about breaking this up into two steps.
Try putting a simple formula in Cell B1:
=ISNUMBER(MATCH(B2, L:L, 0))
This will return a TRUE if there's a match and a FALSE if there is not a match. Then make two conditional rules based on Cell B1.

Related

Excel - Cells to change color based on previous cell value

I am trying to create a formula in Excel whereby a cell would change color based on the value in the previous cell.
for example if cell B2 contains value X and then B3 contains value Y, I would like B3 to turn green if B3> B2 else to turn red.
'Standard' fill red the relevant range and select Column B, clear any existing CF rules and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(B1>B1048576,ROW()<>1)
Format..., select green fill, OK, OK.
I am assuming your column is labelled.

Ignore excel formula is the cell is not blank and change the color of cell when the formula is applied

i want to write a formula in excel where it ignores the formula if the cell is not blank.
]1
In Jan '#P' column which is C11, we have numbers like 2,5,1 and some blank cells. I want to insert the below mentioned formula.
=(IF(C11=1,10%,IF(C11=2,20%,IF(C11=3,25%,IF(C11=4,30%,IF(C11=5,40%,IF(C11=6,50%,IF(C11=7,60%,IF(C11=8,70%,IF(C11=9,80%))))))))))
I want the formula to work only if the cells in column 'D11' which is %U is blank,
1) if D11 is blank, apply the formula that uses C11
2) If D11 is already present , ignore the formula.
I am also wondering if we change the color of the cell using formula. I want the cells to be highlighted in blue color while applying the above formula.
Any help please?
=if(D11="",(IF(C11=1,10%,IF(C11=2,20%,IF(C11=3,25%,IF(C11=4,30%,IF(C11=5,40%,IF(C11=6,50%,IF(C11=7,60%,IF(C11=8,70%,IF(C11=9,80%)))))))))),"")
you cant highlight cell using formula. you can use conditional formatting.

Multi-function conditional formatting cell range

I want to give a quick indication using coloured cells of the time likely to be taken to complete a task. So for example:
if cell B2 = 1 then fill cell range G2:H2 with light red
if cell B2 = 2 then fill cell range G2:J2 with light red
if cell B2 = 3 then fill cell range G2:L2 with light red
How might I achieve this?
Select G2:H2 and use a CF formula rule of:
=$B$2=1
Select G2:J2 and use a CF formula rule of:
=$B$2=2
Select G2:L2 and use a CF formula rule of:
=$B$2=3
each with the formatting of your choice.
If you want a dynamic formula and only one format setting you can select all the cells you want to format, then make a new conditional formatting rule using the formula:
=$B$2*2+COLUMN($G:$G)-COLUMN()>0
Which will affect 2 additional cells each time you increment $B$2.
I used your examples of $B$2 and starting with $G:$G but you can change those if needed.
If you need multiple format settings this won't work.

Excel - programm cells to change colour based on another cell

I am trying to create a formula for Excel whereby a cell would change colour based on the text in the previous cell.
So for example if cell B2 contains the letter X and then B3 is Y, I would like B3 to turn green.
Equally, if B2 contains X and B3 contains W I would like B3 to turn red.
Any ideas much appreciated!
Select cell B3 and click the Conditional Formatting button in the ribbon and choose "New Rule".
Select "Use a formula to determine which cells to format"
Enter the formula: =IF(B2="X",IF(B3="Y", TRUE, FALSE),FALSE), and choose to fill green when this is true
Create another rule and enter the formula =IF(B2="X",IF(B3="W", TRUE, FALSE),FALSE) and choose to fill red when this is true.
More details - conditional formatting with a formula applies the format when the formula evaluates to TRUE. You can use a compound IF formula to return true or false based on the values of any cells.
Select ColumnB and as two CF formula rules apply:
Green: =AND(B1048576="X",B1="Y")
Red: =AND(B1048576="X",B1="W")
Use conditional formatting.
You can enter a condition using any cell you like and a format to apply if the formula is true.

Excel: How to use conditional format in other cell?

How to use conditional format in cell A1 if B1 = "foo".
Example, B1 = IF("FOO";;), A1 is yellow color.
Is Excel 2007.
Use the following coniditona format formula for cell A1
=($B$1="Foo")
Note That if you want to apply this to the entire column A then make the following two adjustments.
1 - change the formula to remove the $ from the row in the formula so that it reads =($B1="Foo")
2 - ensure that the formatting is applied to the entire column

Resources