Changes after a specific date.

jyokom

Board Regular
Joined
May 24, 2004
Messages
148
I am trying to have cells display red for information that was typed after a certain date. I know that is easy except that I don't wan't the information that already exhists in the cells to be formatted differently, only changes after the date.

Any suggestions?
 
Assuming you don't have the Format conditions in place yet.
Code:
Sub CF()

With Range("A3:B4").
    FormatConditions.Add Type:xlExpression, Formula1:="=And($A$1,A3<>A10)"
    .FormatConditions(1).Font.ColorIndex = 3
    .Copy
    Range("A10").PasteSpecial xlFormats
End With

End Sub
You may have to play around with your CF expression as I am unsure how you are making your determinations.

Finally I am not sure what you mean by:
How do you keep A1 as a constant? I know that you could define a string and assign it the value of A1, but how would you add that in the format?
Your code created the constant in A1.. is that not how you wanted it to work?
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,216,175
Messages
6,129,305
Members
449,499
Latest member
HockeyBoi

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