<?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 How to find min max for a range in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-min-max-for-a-range/m-p/227617#M41022</link>
    <description>&lt;P&gt;Hello People&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help. I have an input dataset with a range on min and max values per grouping. I would like to get the first and last value per range. See below for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;INPUT:&lt;/P&gt;
&lt;TABLE width="192" style="width: 144pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL width="64" style="width: 48pt;" span="3" /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD width="64" height="20" style="border: 0px black; border-image: none; width: 48pt; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;RANGE&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MIN&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MAX&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;High&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;10&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;High&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;11&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;20&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;21&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;29&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;30&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;69&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;70&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;99&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;100&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;299&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;300&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;499&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;500&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1499&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1500&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Very Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Very Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;9000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DESIRED OUTPUT:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="192" style="width: 144pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL width="64" style="width: 48pt;" span="3" /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD width="64" height="20" style="border: 0px black; border-image: none; width: 48pt; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;RANGE&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MIN&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MAX&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;High&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;20&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;21&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Very low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;9000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2015 08:28:23 GMT</pubDate>
    <dc:creator>Havi</dc:creator>
    <dc:date>2015-09-29T08:28:23Z</dc:date>
    <item>
      <title>How to find min max for a range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-min-max-for-a-range/m-p/227617#M41022</link>
      <description>&lt;P&gt;Hello People&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help. I have an input dataset with a range on min and max values per grouping. I would like to get the first and last value per range. See below for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;INPUT:&lt;/P&gt;
&lt;TABLE width="192" style="width: 144pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL width="64" style="width: 48pt;" span="3" /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD width="64" height="20" style="border: 0px black; border-image: none; width: 48pt; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;RANGE&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MIN&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MAX&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;High&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;10&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;High&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;11&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;20&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;21&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;29&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;30&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;69&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;70&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;99&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;100&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;299&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;300&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;499&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;500&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1499&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1500&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Very Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Very Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;9000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DESIRED OUTPUT:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="192" style="width: 144pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL width="64" style="width: 48pt;" span="3" /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD width="64" height="20" style="border: 0px black; border-image: none; width: 48pt; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;RANGE&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MIN&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="64" style="border: 0px black; border-image: none; width: 48pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;MAX&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;High&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;20&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Medium&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;21&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15pt;"&gt;
&lt;TD height="20" style="border: 0px black; border-image: none; height: 15pt; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Very low&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2001&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" style="border: 0px black; border-image: none; background-color: transparent;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;9000&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 08:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-min-max-for-a-range/m-p/227617#M41022</guid>
      <dc:creator>Havi</dc:creator>
      <dc:date>2015-09-29T08:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to find min max for a range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-min-max-for-a-range/m-p/227618#M41023</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;&amp;nbsp; input RANGE $ MIN MAX;&lt;BR /&gt;datalines;&lt;BR /&gt;High 1 10&lt;BR /&gt;High 11 20&lt;BR /&gt;Medium 21 29&lt;BR /&gt;Medium 30 69&lt;BR /&gt;Medium 70 99&lt;BR /&gt;Medium 100 299&lt;BR /&gt;Medium 300 499&lt;BR /&gt;Medium 500 1000&lt;BR /&gt;Low 1001 1499&lt;BR /&gt;Low 1500 2000&lt;BR /&gt;Very_Low 2001 6000&lt;BR /&gt;Very_Low 6001 9000&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=have;&lt;BR /&gt;&amp;nbsp; by range min;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;&amp;nbsp; set have;&lt;BR /&gt;&amp;nbsp; by range;&lt;BR /&gt;&amp;nbsp; retain min_val max_val;&lt;BR /&gt;&amp;nbsp; if first.range then min_val=min;&lt;BR /&gt;&amp;nbsp; if last.range then do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; max_val=max;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To add, you can also do:&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create table WANT as&lt;BR /&gt;&amp;nbsp; select RANGE,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min(MIN) as MIN,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max(MAX) as MAX&lt;BR /&gt;&amp;nbsp; from HAVE&lt;BR /&gt;&amp;nbsp; group by RANGE;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 08:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-min-max-for-a-range/m-p/227618#M41023</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-09-29T08:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to find min max for a range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-min-max-for-a-range/m-p/227631#M41029</link>
      <description>Thanks RW9 - will try this and let you know.</description>
      <pubDate>Tue, 29 Sep 2015 11:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-min-max-for-a-range/m-p/227631#M41029</guid>
      <dc:creator>Havi</dc:creator>
      <dc:date>2015-09-29T11:24:14Z</dc:date>
    </item>
  </channel>
</rss>

