The following snippet will set conditional formatting in the selection
to show red if not equal to the value in D.
Selection.FormatConditions.Delete
Selection.FormatConditions.Add _
Type:=xlCellValue, _
Operator:=xlNotEqual, _
Formula1:="=D1"
Selection.FormatConditions(1).Font.ColorIndex = 3
This is taken almost directly from the macro recorder.