2016-04-19 52 views
0

我有一份報告,我們在SAS中運行,並在基於Excel公式的交通顏色編碼的Excel中格式化。我真的很想在SAS中創建所有的東西,所以我一直使用PROC REPORT創建我的表格。但是我不知道,如果紅綠燈(如下圖所示),可以在SAS使用,而且他們很固執,我需要紅綠燈(甚至箭頭),但不突出整個小區或文本。我正在使用SAS EG 9.4。我應該使用圖像將圓圈填充到另一列嗎?還是有一個很好的方法來做到這一點?Proc Report使用交通燈進行顏色編碼而不是突出顯示整個單元格?

Example of traffic light coloring

回答

-1

我沒有在SAS的經驗。我只是在Excel中記錄這個。這是創建stoplight條件格式的相關代碼。

Sub Macro1() 

    Range("G4:G9").Select 
    Selection.FormatConditions.AddIconSetCondition 
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority 
    With Selection.FormatConditions(1) 
     .ReverseOrder = False 
     .ShowIconOnly = False 
     .IconSet = ActiveWorkbook.IconSets(xl3TrafficLights1) 
    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 
End Sub 
相關問題