Hi everyone,
I need a macro to change the font of entire rows of data for two conditions.
(1) If column C (age of column B) is greater than 30 days, but less than 61 days, the font should be BOLD and BLACK.
(2) If Column C is greater than 60 days, the font should be BOLD AND RED.
I'm definitely getting frustrated ... this should be so simple.
I need a macro to change the font of entire rows of data for two conditions.
(1) If column C (age of column B) is greater than 30 days, but less than 61 days, the font should be BOLD and BLACK.
(2) If Column C is greater than 60 days, the font should be BOLD AND RED.
I'm definitely getting frustrated ... this should be so simple.
Code:
Dim wrkRng As Range
With ActiveWorkbook.Worksheets("Sheet1").Range("A1:M1071")
.FormatConditions.Delete
Set wrkRng = ActiveWorkbook.Worksheets("Sheet1").Range("A1:K1071")
End With
With wrkRng
.FormatConditions.Add Type:=xlExpression, Formula1:="=AND($C2>30,$C2<=60)"
With .FormatConditions(1).Font
.Bold = True
.Color = RGB(0, 0, 0)
End With
End With
With wrkRng
.FormatConditions.Add Type:=xlExpression, Formula1:="=$C2>=61"
With .FormatConditions(2).Font
.Bold = True
.Color = RGB(255, 0, 0)
End With
End With