/ Published in: SAS

Colour code table cells to help visually reveal results.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
data tempdata; length Q1 $15; input Site Q1 $ evaltot_Sum Red Amber Green; cards; 3 Cleanliness 2 4 2 4 3 Friendliness 3 4 4 3 3 Responsiveness 3 4 4 3 3 Condition 3 4 4 3 3 Safety 3 4 4 3 4 Cleanliness 1 1 4 4 4 Friendliness 3 4 4 3 4 Responsiveness 3 4 4 3 4 Condition 3 4 4 3 4 Safety 3 4 4 3 9 Cleanliness 2 4 2 4 9 Friendliness 3 4 4 3 9 Responsiveness 3 4 4 3 9 Condition 3 4 4 3 9 Safety 1 1 4 4 ; run; Proc Format ; Value BGColor 1 = CXFF0000 2 = CXFFFF00 3 = CX00FF00 4 = CXD3D3D3 5 = CXA69F7A ; Run ; ods html; proc print data = tempdata noobs label; var Q1; var Red / style={background=bgcolor.}; var Amber / style={background=bgcolor.}; var Green / style={background=bgcolor.}; by Site; label Red=’R’ Amber=’A’ Green=’G’ Q1=’Services and Facilities’; run; ods html close;
Comments
