LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 5 Mar 2010 18:23:47 -0500
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Traffic lighting for character variables?

Hi there,

For numeric var, we can define range in format to control the cell background/foreground. What about character var?

data xx; s='123523'; output; s=' 234'; output; s='Abc dd'; output; run;

ods pdf file="c:\temp\junk.pdf" style=printer;

proc format; value $msbg low-high='white' other='black' ;

options missing=''; proc print data=xx; var s / style=[background=$msbg.]; run;

ods pdf close;

My goal is to make s black background, if s value includes any letter other than numbers (0-9). For the above data, obs=3 has value 'Abc dd', which is not all numnbers, therefore, this cell need to be black.

Maybe picture format?

Thanks

Ya


Back to: Top of message | Previous page | Main SAS-L page