Conditional Formatting of cells containing interger values

T

tralbert

I'm wanting to set up conditional formatting that looks at a range of
interger values.

For example I want to mark the following ranges in yellow:

-1499 to -200 and +200 to +1499

And these ranges in red:

<=-1500 and >=+1500

My problem is can I just do this in the conditional formatting section or
will I actually need to write it as a Macro?

Thanks!
 
A

akphidelt

Alright, try this. Assume the test data starts in cell A1 and change
according to your actual data.

Hilight all your data you want the conditional formatting applied to.
Click on format-->condition formatting

In the first condition change Cell Value is to Formula Is

Then put in the formula

=OR(AND(A1<-200,A1>-1499),AND(A1>200,A1<1499))
Then you can change the format to yellow or whatever you want

Then click add to create another condition and once again select formula is
and type in

=OR(A1<=-1500,A1>=1500)

Then format this to red or whatever you want.
This should work
 
T

tralbert

No dice. When I input the two formulas all of the cells showed up in red (the
color for the +-1500.
 
K

ken-hup

Good original answer however small error..
First condition - Frmula is:
=OR(A1<=-1500,A1>=1500) will go (Yellow)..
second Condition - Formula is:
=OR(AND(A1<=-200,A1>=-1499),AND(A1>=200,A1<=1499)) will go (Red)

Note the equal signs as well

Good Luck
 
T

tralbert

Still turning everything red. I do agree though I think the "=" needs to be
in there as well.

Thanks for your help!
 
T

tralbert

Woo hoo! I got it to work! Course you know what it was I finally realized I
was doing wrong? Inputting the wrong column value! D'oh!

Thanks again for all your help! Both of you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top