Excel: compare and format cells - excel

I have 2 columns with different values.
What I wish to accomplish is this:
1. if value of any cell in A is not in any cell of B > make cell blue
2. if value of any cell in B is not in any cell of A > make cell yellow
3. if value of any cell in A is also in any cell of B > make cell green
A2 found in B2, make A2 & B2 both green
A3 nowhere in B, make A3 blue
A4 found in B3, make both green
B8 nowhere in A, make B8 yellow
A8 nowhere in B, make A8 blue
I hope this makes sense and is possible with conditional formatting. I couldn't figure out the formula to use for this. Any help would be much appreciated.

Please select A2:A8, HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format, Format values where this formula is true:
=MATCH($A2,$B$1:$B$10,0)
with green formatting and another rule:
=ISERROR(MATCH($A2,$B$1:$B$10,0))
with blue formatting.
Select B2:B8 and repeat the above with:
green: =MATCH($B2,$A$1:$A$10,0) and yellow: =ISERROR(MATCH($B2,$A$1:$A$10,0)).

Related

I need a RAG formula organising cells less that other cell by 500

What I need help with is a formula to change Red Amber Green when the value of the cell is 500 less than the specified cell. For example
B2 is 3,700 and C2 is 4,000
I need b2 to display as amber because it is within 500 of C2
If B2 is 3,500 or less it needs to be green
And if B2 is 4,000 and greater it needs to be red
If your intention is to set the background colour of cell B2 based on its relationship with cell C2, you'll need to create three Conditional Formatting rules based on formulas as follows:
Fill colour = red with the formula =b2>c2
Fill colour = amber with the formula =c2-b2<=500
Fill colour = green with the formula =c2-b2>500

Conditional Formatting in Excel Based on Drop Down Value

Need solution: (Unable to find in group based on below example)
Format cell color based on drop down.
Example
If A1 Drop down value 'Shirt' then color A2, A5 and A6 as yellow.
If A1 Drop down value 'Tie' then color A3, A7 and A9 as green.
User has to fill the highlighted columns if they select the value as Shirt or Tie.
Two rules with formula:
First:
Applies To: =$A$2,$A$5:$A$6
Formula: =$A$1="Shirt"
Second:
Applies To: =$A$3,$A$7,$A$9
Formula: =$A$1="Tie"

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.

Excel conditional formatting per row cells

Is it possible to create a conditional statement to do the following without having to create the conditional format for each row?
For each row, if row column D cell is less than the value of row column A cell I want it to highlight red. If row column D cell is greater than the value of row column A cell, I want it to highlight green.
Example:
if D1 < A1 Highlight RED
if D1 > A1 Highlight GREEN
if D2 < A2 Highlight RED
if D2 > A2 Highlight Green
and so on and so forth....
Assuming you want Column A's cells to highlight the color, set up your conditional formatting like this:
Formula: =$D1>$A1 for Green, =$D1<$A1 for Red
Then, make sure the "Applies To" range is correct (this is where I personally usually mess up):
Applies to (for both): $A$1:$A$10
If you want the row to highlight, then the "Applies to" range is =$1:$10 or just =$A$1:$D$10.

Conditional formatting for cells when cell above has the same value

Is it possible to apply conditional formatting to a whole sheet such that whenever the cell above the current cell has the same value (either text or number) as the current cell, the current cell will be formatted yellow fill/blue font?
For example, when cell:
A1 is blank
A2 AAA
A3 AAA
A4 AAA
A5 is blank
A6 AAA
A7 AAA
only cells A3, A4 and A7 will be formatted with yellow fill and font blue.
While in A2, please try a Conditional Formatting formula rule of:
=AND(A1=A2,A2<>"")
with Applies to =$2:$20 or as far down as you wish or are able to go, with yellow fill and blue font.

Resources