Hi there,
Trying to use VBA for apply conditional formatting to a chart of data. Would like to see all cells in the selected range with a value greater than or equal to 0.65. The code I have works, somewhat, but only checks if the first cell in the row has the value, not each individual cell.
Range(Cells(RangeStart, 4), Cells(ActiveCell.Row, 15)).Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:=Cells(10, 4) >= 0.65
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(255, 0, 255)
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
The result of this colors the following row entirely pink, when I am looking to have it only shade those cells that are greater
0.67 0.6 0.34 0.33 0.38 0.33 0.32 0.33 0.3 0.3 0.29 0.31
Any help would be greatly appreciated,
Trying to use VBA for apply conditional formatting to a chart of data. Would like to see all cells in the selected range with a value greater than or equal to 0.65. The code I have works, somewhat, but only checks if the first cell in the row has the value, not each individual cell.
Range(Cells(RangeStart, 4), Cells(ActiveCell.Row, 15)).Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:=Cells(10, 4) >= 0.65
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(255, 0, 255)
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
The result of this colors the following row entirely pink, when I am looking to have it only shade those cells that are greater
0.67 0.6 0.34 0.33 0.38 0.33 0.32 0.33 0.3 0.3 0.29 0.31
Any help would be greatly appreciated,