<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ODS Excel - Conditional formatting - Consider a variable empty while populated in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Conditional-formatting-Consider-a-variable-empty-while/m-p/632751#M187615</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to apply condition formatting to a variable based on another numeric variable.&lt;/P&gt;&lt;P&gt;The variable "num" is always populated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, without any error message or warning, the conditional formatting doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When num=9999 none of the lines are italicized.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compute var;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;if num&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;9999&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; then call define(_COL_,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'style'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'style={font_style=italic}'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;endcomp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When num ne 9999 all lines are italicized.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compute var;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;if num &amp;nbsp; ne &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: teal; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;9999&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt; then call define(_COL_,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;'style'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;'style={font_style=italic}'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;endcomp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When missing(num)=1 all lines are italicized.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compute var;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;if missing(num)=1 &lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;then call define(_COL_,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-size: 10pt; line-height: 1.2;"&gt;'style'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-size: 10pt; line-height: 1.2;"&gt;'style={font_style=italic}'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;endcomp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;However, when do the following test on the dataset used in the proc report the variable num seems fine:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; dataset_test;&lt;/P&gt;&lt;P&gt;set dataset;&lt;/P&gt;&lt;P&gt;if num=&lt;STRONG&gt;9999&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: There were 34 observations read from the data set WORK.&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;dataset&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;dataset&lt;/SPAN&gt;_TEST has 24 observations and 25 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also note that I have the following lines prior to the conditional formatting.&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;columns var num;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;define num / order noprint;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Any Idea why the variable num is not correctly assessed?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Thanks!&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2020 18:13:20 GMT</pubDate>
    <dc:creator>Roger5</dc:creator>
    <dc:date>2020-03-17T18:13:20Z</dc:date>
    <item>
      <title>ODS Excel - Conditional formatting - Consider a variable empty while populated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Conditional-formatting-Consider-a-variable-empty-while/m-p/632751#M187615</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to apply condition formatting to a variable based on another numeric variable.&lt;/P&gt;&lt;P&gt;The variable "num" is always populated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, without any error message or warning, the conditional formatting doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When num=9999 none of the lines are italicized.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compute var;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;if num&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;9999&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; then call define(_COL_,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'style'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'style={font_style=italic}'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;endcomp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When num ne 9999 all lines are italicized.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compute var;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;if num &amp;nbsp; ne &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: teal; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;9999&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt; then call define(_COL_,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;'style'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;'style={font_style=italic}'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; line-height: 1.2;"&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;endcomp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When missing(num)=1 all lines are italicized.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compute var;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;if missing(num)=1 &lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;then call define(_COL_,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-size: 10pt; line-height: 1.2;"&gt;'style'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: purple; font-size: 10pt; line-height: 1.2;"&gt;'style={font_style=italic}'&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-family: &amp;amp;quot; courier new&amp;amp;quot;; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;endcomp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: white; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: black; font-size: 10pt; line-height: 1.2;"&gt;However, when do the following test on the dataset used in the proc report the variable num seems fine:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; dataset_test;&lt;/P&gt;&lt;P&gt;set dataset;&lt;/P&gt;&lt;P&gt;if num=&lt;STRONG&gt;9999&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: There were 34 observations read from the data set WORK.&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;dataset&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;dataset&lt;/SPAN&gt;_TEST has 24 observations and 25 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also note that I have the following lines prior to the conditional formatting.&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;columns var num;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;define num / order noprint;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Any Idea why the variable num is not correctly assessed?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Thanks!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 18:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Conditional-formatting-Consider-a-variable-empty-while/m-p/632751#M187615</guid>
      <dc:creator>Roger5</dc:creator>
      <dc:date>2020-03-17T18:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Conditional formatting - Consider a variable empty while populated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Conditional-formatting-Consider-a-variable-empty-while/m-p/632757#M187616</link>
      <description>&lt;P&gt;It is not clear what code you actually run.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it looks like you might be trying to reference a variable BEFORE it exists in the report.&lt;/P&gt;
&lt;P&gt;If VAR is before NUM in the report then in the compute block for VAR the value of NUM is not known yet.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 18:36:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Conditional-formatting-Consider-a-variable-empty-while/m-p/632757#M187616</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-17T18:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Conditional formatting - Consider a variable empty while populated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Conditional-formatting-Consider-a-variable-empty-while/m-p/632761#M187617</link>
      <description>&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;proc report data=dataset nofs nowd headline contents='' spanrows&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;style(header)=[foreground=black background=white font_weight=bold /*background=#D3D3D3*/ font_size=9.5pt cellheight=0.25in fontfamily=arial vjust=m bordercolor=black] split='/'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;style(report)=[foreground=black background=white font_size=9.5pt cellpadding =4.pt];&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns&amp;nbsp; num var ;&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;define var/ order display "variable"&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;style(header)=[just=L background=white bordercolor=black foreground=black]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;style(column)=[just=L bordercolor=black font_size=9.5pt fontfamily=arial width=6.0in ] ;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;define num/ order noprint;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&amp;nbsp;&amp;nbsp;compute var;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if missing(num)=1&amp;nbsp; then call define(_COL_,'style','style={font_style=italic}');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;endcomp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;run;&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Mar 2020 18:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Conditional-formatting-Consider-a-variable-empty-while/m-p/632761#M187617</guid>
      <dc:creator>Roger5</dc:creator>
      <dc:date>2020-03-17T18:48:26Z</dc:date>
    </item>
  </channel>
</rss>

