Sub 条件付き書式_データバー_のマイナス部分の色を指定する()
Columns("A").FormatConditions.AddDatabar 'データバーを追加
Columns("A").FormatConditions(1).BarColor.Color = RGB(155, 187, 89) 'データバー色指定
Columns("A").FormatConditions(1).BarBorder.Type = xlDataBarBorderSolid '外枠を付ける
Columns("A").FormatConditions(1).BarBorder.Color.Color = RGB(155, 187, 89) '外枠色指定
Columns("A").FormatConditions(1).AxisPosition = xlDataBarAxisAutomatic '表の自動計算
Columns("A").FormatConditions(1).NegativeBarFormat.ColorType = xlDataBarColor 'マイナス部分処理
Columns("A").FormatConditions(1).NegativeBarFormat.BorderColorType = xlDataBarColor 'マイナス部分処理
Columns("A").FormatConditions(1).NegativeBarFormat.Color.Color = RGB(255, 0, 0) 'マイナスの色
Columns("A").FormatConditions(1).NegativeBarFormat.BorderColor.Color = RGB(255, 0, 0) 'マイナス枠線の色
End Sub