Answers for "vba formatconditions for all cells"

VBA
0

excel vba formatconditions range

Dim MyRange As Range
Set MyRange = ThisWorkbook.Worksheets(1).Range("A1:C10")
With MyRange    ' whole row into red when A value <> B value
	.Cells(1, 1).FormatConditions.Add Type:=xlExpression, Formula1:="=$A1<>$B1"
    .FormatConditions(1).Font.Color = vbRed
    .Cells.FormatConditions(1).ModifyAppliesToRange MyRange
End With
Posted by: Guest on February-22-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language