L
lpdarspe
I have the following macro where I have dates embedded in certain cells
because I do not know how to put them in a condition statement. In the macro
below cell $R$1 is Today(), cell $S$1 is 01/01/00 and cell $T$1 is Today() +
7. How can I make the macro work with refering to the values in the cells?
Sub todaydate()
Columns("F:F").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=$S$1", Formula2:="=$R$1"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = True
.ColorIndex = 3
End With
Selection.FormatConditions(1).Interior.ColorIndex = 36
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=$R$1", Formula2:="=$T$1"
Selection.FormatConditions(2).Font.ColorIndex = 41
Selection.FormatConditions(2).Interior.ColorIndex = 36
Range("A1").Select
End Sub
because I do not know how to put them in a condition statement. In the macro
below cell $R$1 is Today(), cell $S$1 is 01/01/00 and cell $T$1 is Today() +
7. How can I make the macro work with refering to the values in the cells?
Sub todaydate()
Columns("F:F").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=$S$1", Formula2:="=$R$1"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = True
.ColorIndex = 3
End With
Selection.FormatConditions(1).Interior.ColorIndex = 36
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=$R$1", Formula2:="=$T$1"
Selection.FormatConditions(2).Font.ColorIndex = 41
Selection.FormatConditions(2).Interior.ColorIndex = 36
Range("A1").Select
End Sub