-
StackOverflow 文件
-
excel-vba 教程
-
使用 VBA 進行條件格式化
-
FormatConditions.AddIconSetCondition
Range("a1:a10").FormatConditions.AddIconSetCondition
With Selection.FormatConditions(1)
.ReverseOrder = False
.ShowIconOnly = False
.IconSet = ActiveWorkbook.IconSets(xl3Arrows)
End With
With Selection.FormatConditions(1).IconCriteria(2)
.Type = xlConditionValuePercent
.Value = 33
.Operator = 7
End With
With Selection.FormatConditions(1).IconCriteria(3)
.Type = xlConditionValuePercent
.Value = 67
.Operator = 7
End With
圖示集:
名稱 |
xl3Arrows |
xl3ArrowsGray |
xl3Flags |
xl3Signs |
xl3Stars |
xl3Symbols |
xl3Symbols2 |
xl3TrafficLights1 |
xl3TrafficLights2 |
xl3Triangles |
xl4Arrows |
xl4ArrowsGray |
xl4CRV |
xl4RedToBlack |
xl4TrafficLights |
xl5Arrows |
xl5ArrowsGray |
xl5Boxes |
xl5CRV |
xl5Quarters |
型別:
名稱 |
xlConditionValuePercent |
xlConditionValueNumber |
xlConditionValuePercentile |
xlConditionValueFormula |
運算子:
名稱 |
值 |
xlGreater |
5 |
xlGreaterEqual |
7 |
值:
以條件格式返回或設定圖示的閾值。