0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VBA エクセル アイコンを表示 条件書式を追加

Posted at

1.jpg
セルの範囲内で上位33%が青、下位33%以下が赤、33%以上67%以下が黄
2.jpg
全値の平均以下だったら文字色と塗りつぶし
3.jpg

Sub アイコンセットの表示()
'矢印のアイコンセットを表示
 Range("B4:F15").FormatConditions.AddIconSetCondition
    With Range("B4:F15").FormatConditions(1)
        .IconSet = ActiveWorkbook.IconSets(xl3Arrows)
    End With
End Sub

Sub 強調表示()
'平均以下だったら文字色と塗りつぶし
 Range("B4:F15").FormatConditions.AddAboveAverage
 With Range("B4:F15").FormatConditions(2)
    .AboveBelow = xlBelowAverage
    .Interior.Color = RGB(255, 230, 180)
    .Font.Color = RGB(255, 0, 0)
 End With
End Sub

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?