Dim rdLast As Long
Application.ScreenUpdating = False
rdLast = Cells(Rows.Count, 1).End(xlUp).Row
Columns(14).FormatConditions.Delete
With Range(Cells(3, 14), Cells(rdLast, 14))
With .FormatConditions
.Add Type:=xlExpression, Formula1:="=RC13=RC"
.Add Type:=xlExpression, Formula1:="=RC13<R[1]C"
End With
.FormatConditions(1).Interior.Color = 5296274
.FormatConditions(2).Interior.Color = 255
End With
Columns(15).FormatConditions.Delete
With Range(Cells(3, 15), Cells(rdLast, 15))
With .FormatConditions
.Add Type:=xlExpression, Formula1:="=RC13=RC"
.Add Type:=xlExpression, Formula1:="=RC13<R[1]C"
End With
.FormatConditions(1).Interior.Color = 5296274
.FormatConditions(2).Interior.Color = 255
End With
Application.ScreenUpdating = True
End Sub
citovat