Conditional Formatting for a cell when empty and when it contains a date

Marcie Be

Board Regular
Joined
Jun 25, 2020
Messages
124
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I am looking for a CF that will give me the following

1. When the cell A1 is empty I want the cell to have no format relative to the contents of the cell B1 that contains the CF
2. When cell A1 contains a date that is great than the date in cell B1 then A1 should be Red
3. When the date in cell A1 is less than or equal to the date in B1 then A1 should be Green

I did have a very simple CF formula for 2 & 3

For 2: Cell value <= B1 Format Green
For 3: Cell value > B1 Format Red

The problem I have is when A1 is empty with no date, the cell is green due to the CF. If A1 is empty I want the cell I want the cell to have no format.

Hopefully this makes sense. ( Fingers crossed)

Best Regards

Marcie Be
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
For 2: Cell value <= B1 Format Green
use a formula
Select A1 and use CF
Formula
=AND ( A1 <> "" , A1 < = B1 )
Format green
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
@Fluff This formula gave me the out come I as looking for other than another CF affecting Cell B1 has now been affected.
I also have a CF in Cell B1 Formula:=$C5="Data Transfer" Format Grey. This CF no longer works because of the new CF =AND ( A1 <> "" , A1 < = B1 )
Can you help resolve please?
Best Regards
Marcie Be
 
Upvote 0
What are the ranges those rules are applied to?
 
Upvote 0
What are the ranges those rules are applied to?
Range
$A1 to $A12
$B1 to $B12

Actually the formula :=$C5="Data Transfer" could be $C1

I have simplified the cell locations to A, B & C. In reality that are part of a much larger worksheet where the locations start at $AG6 & $AK6
I hope this helps
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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