0

我有一份我们在 SAS 中运行并在 Excel 格式中运行的报告,该报告具有基于 Excel 公式的交通颜色编码。我真的很想在 SAS 中创建所有内容,所以我一直在使用 PROC REPORT 来创建我的表。但是我不确定交通信号灯(如下所示)是否可以在 SAS 中使用,他们非常坚持我需要交通信号灯(甚至箭头),但不要突出显示整个单元格或文本。我正在使用 SAS EG 9.4。我应该使用图像将圆圈填充在另一列中吗?或者有什么好方法可以做到这一点?

红绿灯着色示例

4

2 回答 2

0

是的你可以。堆栈溢出问题的方式有点长。谷歌返回一些结果。这篇 SGF 论文很好地涵盖了基础知识 http://support.sas.com/resources/papers/proceedings11/290-2011.pdf

于 2016-04-19T20:58:07.267 回答
-1

我没有 SAS 方面的经验。我只是在Excel中记录了这个。这是创建红绿灯条件格式的相关代码。

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
于 2016-04-19T20:49:02.220 回答