<?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 Re: Using conditions in excel file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239552#M308819</link>
    <description>&lt;P&gt;Sure, you can either create a text file that contains the SAS code and run it, or create a few macro variables that are then resolved.&lt;BR /&gt;&lt;BR /&gt;Here's an example of the first method. The second is relatively straightforward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/175-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/175-29.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2015 16:19:44 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-12-16T16:19:44Z</dc:date>
    <item>
      <title>Using conditions in excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239550#M308818</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a group of conditions in a excel sheet like this:&lt;/P&gt;&lt;P&gt;CellA1: condition&lt;BR /&gt;Cell A2: if name &amp;lt;&amp;gt; '' AND date &amp;lt; &amp;amp;date_ref then result=1;&lt;BR /&gt;Cell A3: else if name &amp;lt;&amp;gt; '' AND date &amp;gt; &amp;amp;date_ref then result=-1;&lt;BR /&gt;Cell A4: else result=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where &amp;amp;date_ref is a the reference to a SAS macro variable (like '01Nov2015:00:00:00'dt).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have imported this sheet to a SAS dataset (cond_set), and now I would like to apply this conditions in a different dataset. Something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new_set;
set test;
&amp;lt;check those conditions here&amp;gt;;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;Is this possible?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brunosm&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 15:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239550#M308818</guid>
      <dc:creator>brunosm</dc:creator>
      <dc:date>2015-12-16T15:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditions in excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239552#M308819</link>
      <description>&lt;P&gt;Sure, you can either create a text file that contains the SAS code and run it, or create a few macro variables that are then resolved.&lt;BR /&gt;&lt;BR /&gt;Here's an example of the first method. The second is relatively straightforward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/175-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/175-29.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 16:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239552#M308819</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-16T16:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditions in excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239554#M308820</link>
      <description>&lt;P&gt;Hello Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the reply but... I can't see the examples...&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 16:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239554#M308820</guid>
      <dc:creator>brunosm</dc:creator>
      <dc:date>2015-12-16T16:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditions in excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239557#M308821</link>
      <description>I updated the link above.</description>
      <pubDate>Wed, 16 Dec 2015 16:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239557#M308821</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-16T16:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditions in excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239568#M308822</link>
      <description>&lt;P&gt;Whilst it may be technically possible to do this, I would advise you don't. &amp;nbsp;Excel is not a SAS code editor. &amp;nbsp;What is the purpose behind this? &amp;nbsp;What conditions do you need to check? &amp;nbsp;Is this to capture some user input or something? &amp;nbsp;I can only say that trying to do things this way is going to cause you all kinds of problems - just to start with what kind of logic/syntax checking are you going to do on that spreadsheet? &amp;nbsp;I can guarentee you every user will put something into the sheet that you don't expect and haven't handled for and it will go wrong.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 16:55:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239568#M308822</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-12-16T16:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditions in excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239569#M308823</link>
      <description>&lt;P&gt;Hello RW9,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the reply. I think you are... right!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm going to try a different approach and i'll give feedback on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brunosm&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 17:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239569#M308823</guid>
      <dc:creator>brunosm</dc:creator>
      <dc:date>2015-12-16T17:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditions in excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239572#M308824</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 17:00:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-conditions-in-excel-file/m-p/239572#M308824</guid>
      <dc:creator>brunosm</dc:creator>
      <dc:date>2015-12-16T17:00:53Z</dc:date>
    </item>
  </channel>
</rss>

