<?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: Deleting empty rows and extra columns in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695793#M25217</link>
    <description>&lt;P&gt;I have to do this as part of an assignment for my professor so he wants us to use SAS. I would much rather use excel.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Nov 2020 21:43:34 GMT</pubDate>
    <dc:creator>Sami1532</dc:creator>
    <dc:date>2020-11-01T21:43:34Z</dc:date>
    <item>
      <title>Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695788#M25214</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently trying to use SAS to get rid of the empty excel rows while also deleting some additional columns that I don't need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a generic formula I can use to do this? I'm also using the SAS University edition, not sure if that'll change anything too much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 21:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695788#M25214</guid>
      <dc:creator>Sami1532</dc:creator>
      <dc:date>2020-11-01T21:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695789#M25215</link>
      <description>&lt;P&gt;Why not just fix your Excel spreadsheet and then re-import your data?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 21:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695789#M25215</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-01T21:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695793#M25217</link>
      <description>&lt;P&gt;I have to do this as part of an assignment for my professor so he wants us to use SAS. I would much rather use excel.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 21:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695793#M25217</guid>
      <dc:creator>Sami1532</dc:creator>
      <dc:date>2020-11-01T21:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695796#M25218</link>
      <description>&lt;P&gt;IMO a dumb assignment then&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Investigate the DROP statement for deleting extra columns and the WHERE statement for deleting extra rows.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 21:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695796#M25218</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-01T21:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695798#M25219</link>
      <description>&lt;P&gt;It really is, I'm honestly losing my mind because I don't know how to use SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try to use the DROP function. Quick question a few of my classmates have used this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options missing = '&amp;nbsp; ';&amp;nbsp;&lt;/P&gt;&lt;P&gt;data examtwo;&lt;/P&gt;&lt;P&gt;set examtwo;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if missing(cats(of_all_)) then delete;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- BUT this isn't working for me. It just deletes all my data. Not sure if this is also a possible option?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 22:05:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695798#M25219</guid>
      <dc:creator>Sami1532</dc:creator>
      <dc:date>2020-11-01T22:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695800#M25220</link>
      <description>&lt;P&gt;There's a typo in your code - add a space between of and _all_. Without seeing your data not sure it will work though:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing = '  '; 

data examtwo;

set examtwo; 

if missing(cats(of _all_)) then delete; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;DROP is a statement not a function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  drop COLA COLB;
  set have;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Nov 2020 22:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695800#M25220</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-01T22:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695829#M25221</link>
      <description>&lt;P&gt;Depending on the number of variables you need to drop, it could be easier to use the keep statement instead of drop. With the following keep-statement all variables from FirstVar to LastVar are kept, all vars before FirstVar and after LastVar are dropped. &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;keep FirstVar--LastVar;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Nov 2020 06:02:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/695829#M25221</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-11-02T06:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting empty rows and extra columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/697038#M25334</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If they are simply just empty rows and you know the range that you want to remove, try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA WORK.Want;&lt;/P&gt;&lt;P&gt;SET WORK.Have;&lt;/P&gt;&lt;P&gt;IF _N_ IN (row#:row#) THEN DELETE;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 02:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Deleting-empty-rows-and-extra-columns/m-p/697038#M25334</guid>
      <dc:creator>GoldingAngela</dc:creator>
      <dc:date>2020-11-06T02:04:15Z</dc:date>
    </item>
  </channel>
</rss>

