Icon Sets for Status Indicators
Use icon sets to create visual status indicators based on cell values
422 views
Perfect For:
- Project status
- Performance ratings
- Risk assessment
VBA Code
Sub AddIconSets()
Dim dataRange As Range
Dim iconSet As IconSetCondition
' Select the data range
Set dataRange = Application.InputBox("Select range for icon indicators:", Type:=8)
If dataRange Is Nothing Then Exit Sub
' Clear existing conditional formatting
dataRange.FormatConditions.Delete
' Add traffic light icon set
Set iconSet = dataRange.FormatConditions.AddIconSetCondition
With iconSet
.IconSet = ActiveWorkbook.IconSets(xl3TrafficLights1)
.ShowIconOnly = False ' Show both icons and values
' Configure thresholds
.IconCriteria(2).Type = xlConditionValuePercent
.IconCriteria(2).Value = 33
.IconCriteria(2).Operator = xlGreaterEqual
.IconCriteria(3).Type = xlConditionValuePercent
.IconCriteria(3).Value = 67
.IconCriteria(3).Operator = xlGreaterEqual
End With
MsgBox "Icon indicators added successfully!"
End Sub
Related Topics
icons
status
indicators
traffic lights
Need Custom VBA Solutions?
Our AI-powered VBA generator can create custom code tailored to your specific requirements in seconds.
3 free generations/month — unlimited with Pro
Related Templates
More VBA templates in the same category
Beginner
Highlight Duplicate Values
Automatically highlight duplicate values in a range with conditional formatting
View Template