<?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: rounding value to next integer in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198440#M2614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, it's working!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2015 00:05:40 GMT</pubDate>
    <dc:creator>mlogan</dc:creator>
    <dc:date>2015-06-03T00:05:40Z</dc:date>
    <item>
      <title>rounding value to next integer</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198438#M2612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;can anyone tell me the code how to round a data to it's next integer value? I know how to round down (9.81 to 9), but I don't know how to round up (9.01 to 10)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code I know for rounding except rounding to the next integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data round;&lt;/P&gt;&lt;P&gt;input no;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;9.9&lt;/P&gt;&lt;P&gt;9.4&lt;/P&gt;&lt;P&gt;9.5&lt;/P&gt;&lt;P&gt;9.047&lt;/P&gt;&lt;P&gt;9.55&lt;/P&gt;&lt;P&gt;9.006&lt;/P&gt;&lt;P&gt;9.004&lt;/P&gt;&lt;P&gt;9.999&lt;/P&gt;&lt;P&gt;9.6&lt;/P&gt;&lt;P&gt;9.1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data newround;&lt;/P&gt;&lt;P&gt;set round;&lt;/P&gt;&lt;P&gt;value1 = round(no);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *rounding to the nearest integer;&lt;/P&gt;&lt;P&gt;value2 = int(no);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Keep the integer only;&lt;/P&gt;&lt;P&gt;value3 = round(no,0.01); *rounding to the nearest second decimal;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 23:00:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198438#M2612</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2015-06-02T23:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: rounding value to next integer</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198439#M2613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you may try using the ceil() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value4 = ceil(no);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 23:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198439#M2613</guid>
      <dc:creator>billfish</dc:creator>
      <dc:date>2015-06-02T23:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: rounding value to next integer</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198440#M2614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, it's working!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 00:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198440#M2614</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2015-06-03T00:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: rounding value to next integer</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198441#M2615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the solution above works for you please mark this (and other) questions as answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 00:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/rounding-value-to-next-integer/m-p/198441#M2615</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-06-03T00:21:46Z</dc:date>
    </item>
  </channel>
</rss>

