Conditional Formatting and IF Statements same cell

loiacono9

New Member
Joined
Nov 14, 2014
Messages
3
I am trying to create a formula to alert me when a data point is lower than a value (alert in red), when a value is within a range (alert in green), and when higher than a value (alert in orange)...all within one cell. Any help how to do so?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
you can use conditional formatting
but it would be useful to know the layout of the data

what cell is the "value" you are comparing in

lets assume it was in A1
and all the other values are in
A2 to Z2

the you would setup three rules

for 2007 or 2010 excel version
Conditional Formatting


Highlight applicable range >>
A2:Z2


Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:


= A2<$A$1


Format… [Number, Font, Border, Fill] - Fill RED
choose the format you would like to apply when the condition is true
OK >> OK

Next formula

=AND( A2>= $A$1 , A2<= $A$1 )

fill for Green

=A2 > $A$1
fill for yellow

Excel Workbook
ABCDEFGHIJKLMNOPQRSTUVWXYZ
110
21.522.533.544.555.566.577.588.599.51010.51111.51212.51313.514
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =AND(A2<=$A$1, A2>=$A$1)Abc
A22. / Formula is =A2>$A$1Abc
A23. / Formula is =A2<$A$1Abc
 
Last edited:
Upvote 0
My data range is D6 (736) and E6 (1166) and want to have the changing value in H6 alerted low in Red, within range in green, and above range in orange. Does that make sense?
 
Upvote 0
try this

Excel Workbook
DEFGH
67361166735
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H61. / Formula is =AND(H6>=D6,H6<=E6)Abc
H62. / Formula is =H6>E6Abc
H63. / Formula is =H6Abc
 
Upvote 0
Another solution is perhaps to show traffic lights (and value 735) in H6. BUT it can ONLY compare to 1 range as in fixed $D$6 and fixed $E$6
Traffic lights red amber green. green trf light when value is >=, Value, =$E$6 ,type, Formula. Amber when < formula and, >= , =$D$6, Formula
You can set the range to e.g. H6:H100 but it will ONLY compare to D6,E6.
 
Upvote 0

Forum statistics

Threads
1,217,414
Messages
6,136,492
Members
450,016
Latest member
murarj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top