Created
September 19, 2012 08:01
-
-
Save pythonexcels/3748300 to your computer and use it in GitHub Desktop.
Excel Macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Macro1() | |
' | |
' Macro1 Macro | |
' | |
Range("B2:K22").Select | |
Selection.FormatConditions.AddColorScale ColorScaleType:=3 | |
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority | |
Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ | |
xlConditionValueLowestValue | |
With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor | |
.Color = 13011546 | |
.TintAndShade = 0 | |
End With | |
Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ | |
xlConditionValuePercentile | |
Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 | |
With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor | |
.Color = 8711167 | |
.TintAndShade = 0 | |
End With | |
Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ | |
xlConditionValueHighestValue | |
With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor | |
.Color = 7039480 | |
.TintAndShade = 0 | |
End With | |
Range("A1").Select | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment