![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I would like cell A1 to have conditional formatting set so that if the number entered is less than 100, the cell turns red. That part I have, but if the cell is blank, I do not want it to turn any color.
Can someone please show me how to porperly write out the formula to achive this? Thanks in advance! Randy |
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Activate Format|Conditional Formatting. Choose Cell Value Is and Less Than, the enter the number 100 in the box next to the Less Than box. Activate Format. Select red as color on the Patterns tab. Click OK, OK. |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
I think you need a formula for this Aladin. Change the Cell Value Is to Formula Is and enter the following formula: -
=AND(A1<>"",A1<100) Where A1 is the cell with your data in. |
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
That formula works great, but there is one other thing that I can't figure out. It also changes the cell to red if the value is over 100. How do I prevent that?
Thanks for all your help. Randy |
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=AND(ISNUMBER($A$1),$A$1<100) As Mudface noted, I failed to attend to your "but if the cell is blank". Aladin |
|
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
That is exactly what I needed.
Thanks, guys. Randy |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|