Advertisement
Guest User

Untitled

a guest
Mar 7th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Add color bars in column I in ATP sheet
  2.    sATP.Select
  3.     sATP.Range("I8:I" & Lastrow).Select
  4.    
  5.     Selection.FormatConditions.AddDatabar
  6.     Selection.FormatConditions(Selection.FormatConditions.Count).ShowValue = True
  7.     Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
  8.     With Selection.FormatConditions(1)
  9.         .MinPoint.Modify newtype:=xlConditionValueLowestValue
  10.         .MaxPoint.Modify newtype:=xlConditionValueHighestValue
  11.     End With
  12.     With Selection.FormatConditions(1).BarColor
  13.         .Color = 3997685
  14.         .TintAndShade = 0
  15.     End With
  16.     Selection.FormatConditions(1).BarFillType = xlDataBarFillSolid
  17.     Selection.FormatConditions(1).Direction = xlLTR
  18.     Selection.FormatConditions(1).NegativeBarFormat.ColorType = xlDataBarColor
  19.     Selection.FormatConditions(1).BarBorder.Type = xlDataBarBorderSolid
  20.     Selection.FormatConditions(1).NegativeBarFormat.BorderColorType = _
  21.         xlDataBarColor
  22.     With Selection.FormatConditions(1).BarBorder.Color
  23.         .Color = 0
  24.         .TintAndShade = 0
  25.     End With
  26.     Selection.FormatConditions(1).AxisPosition = xlDataBarAxisAutomatic
  27.     With Selection.FormatConditions(1).AxisColor
  28.         .Color = 0
  29.         .TintAndShade = 0
  30.     End With
  31.     With Selection.FormatConditions(1).NegativeBarFormat.Color
  32.         .Color = 255
  33.         .TintAndShade = 0
  34.     End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement