Conditional Formatting (ignore unpopulated cell)

kms508

New Member
Joined
Jul 19, 2007
Messages
4
I am doing a conditional format in which the color of a cell will be green if the value is larger than another cell (a goal cell) or red if it is less than that goal cell. When the goal cell is unpopulated, the conditionally formatted cell will always return green. I want it to ignore an unpopulated goal cell rather than read the goal cell as zero. How do I do this?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,961
Office Version
  1. 365
Platform
  1. Windows
Since you didn't provide any specifics, in this example I am using C1 as the cell with Conditional Formatting and A1 as the cell you are comparing to:

Formula Is:
=AND($C1>$A1,$A1<>"")
 
Upvote 0

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Whatever formula you have for the conditional format formula, add AND to it..

Say your current formula is
A1 = Cell to Color
B1 = GOAL Cell
Code:
=A1>B1    -   formats Green
=A1<B1    -   formats Red

Change to

=AND(A1>B1,B1<>"")
=AND(A1<B1,B1<>"")
 
Upvote 0

Forum statistics

Threads
1,191,587
Messages
5,987,512
Members
440,098
Latest member
MickyMouse123

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
Top