<?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: Search for Nearest Value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16366#M14908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the slow response; I got caught up on something else.&amp;nbsp; I initially tried your second solution, but I can not get it to work at all.&amp;nbsp; I can't even get it to locate the minimum value of the column...&amp;nbsp; What's going on?&amp;nbsp; I noticed that my column was a string column, not a numeric column, so I converted it, but that didn't seem to help any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;dtFile1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"X_location"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;data type&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Numeric"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;col &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; dtFile1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"X_location"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;rows &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Loc Min&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(((&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;col&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;getValues&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)))&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jan 2016 16:42:22 GMT</pubDate>
    <dc:creator>natalie_</dc:creator>
    <dc:date>2016-01-29T16:42:22Z</dc:date>
    <item>
      <title>Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16360#M14902</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;&lt;/P&gt;&lt;P&gt;I need to search for the nearest value of something in a column.&amp;nbsp; Is there a function (that I just can't find) to do this, or do I need to make my own routine to do so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Natalie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 21:48:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16360#M14902</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-19T21:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16361#M14903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Natalie,&lt;/P&gt;&lt;P&gt;Here is a simple function that I wrote that returns the value which is the closest to the target value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Names Default To Here&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;open&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Consolas;"&gt;"$SAMPLE_DATA\Semiconductor Capability.jmp"&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;findClosest &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Function&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;value&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; col&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;a&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; R&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; aa&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; justAbove&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; justBelow&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; value&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; col&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; a &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Column&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; col &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Consolas;"&gt;get values&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; R &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Rank&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; a &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; aa &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; sorted &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; a&lt;STRONG&gt;[&lt;/STRONG&gt;R&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; b &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Consolas;"&gt;108&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; justAbove &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; aa&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; aa &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; value &lt;STRONG&gt;)[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;]]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; justBelow &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; aa&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; aa &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; value &lt;STRONG&gt;)[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;N Rows&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; aa &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; b &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)]]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;If&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; justAbove &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; value &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; value &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; justBelow&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; justAbove&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;show&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;minimum &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; findClosest&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Consolas;"&gt;108&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Consolas;"&gt;"NPN1"&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Consolas;"&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 03:14:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16361#M14903</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-01-20T03:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16362#M14904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jim, this is great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can definitely use this.&amp;nbsp; However, I need to know the row number, so that I can get the corresponding value in the next column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After using your function and finding the nearest value, should I search for that value in the original data to find the row number?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 16:49:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16362#M14904</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-20T16:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16363#M14905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or, you can create a matrix vector&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rowmat=index(1,N Rows(dt));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then sort it using the same Rank matrix&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rowmatsorted = rowmat&lt;R&gt;;&lt;/R&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then it will contain the row numbers in the same order as your sorted value matrix, so when you get the nearest value position from the values matrix, the same position in the rowmatsorted matrix will have the row number&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 18:46:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16363#M14905</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-01-20T18:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16364#M14906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below are two ways to get the row(s) of the nearest value. The first returns a matrix of row numbers, and hence allows for ties. For the the second approach that uses the LocMin() function it is assumed that there is one unique nearest value; it will return the row number of the first instance only and neglecting any ties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;Names Default To Here&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"$SAMPLE_DATA\Big Class.jmp"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;col &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"weight"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; min-height: 13px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; min-height: 13px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #008f00;"&gt;// Select all rows that are closest to a value&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;value &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;99.5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;d &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Abs&lt;/SPAN&gt;&lt;STRONG&gt;((&lt;/STRONG&gt;col &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get values&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;-&lt;/SPAN&gt; value&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;rows &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;d &lt;SPAN style="color: #011993;"&gt;==&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Min&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;d&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;Show&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;rows&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;select rows&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;rows&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; min-height: 13px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #008f00;"&gt;// Select first row that is closest to a value&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;value &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;112&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;rows &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Loc Min&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;Abs&lt;/SPAN&gt;&lt;STRONG&gt;((&lt;/STRONG&gt;col &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get values&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;-&lt;/SPAN&gt; value&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;Show&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;rows&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;select rows&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;rows&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 23:04:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16364#M14906</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2016-01-20T23:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16365#M14907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more way using KDTable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;dt = Open( "$sample_data/big class.jmp" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// create the input matrix for kdtable: [95 59, 123 61, 74 55, ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;data = (dt:weight &amp;lt;&amp;lt; getasmatrix) || (dt:height &amp;lt;&amp;lt; getasmatrix);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// create the lookup table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;lookup = KDTable( data );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// do an example lookup: find the 10 nearest people to a weight of 100 pounds and height of 60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// inches within a distance of 5.&amp;nbsp; (5 is in the same "units" as weight and pounds...normalize?)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;{rowNumbers, distances} = lookup &amp;lt;&amp;lt; knearestrows( {10, 5}, [100 60] );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// display the results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;For( irow = 1, irow &amp;lt;= N Cols( rowNumbers ), irow++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; rowIndex = rowNumbers[irow];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; Write( dt:name[rowIndex], " w=", dt:weight[rowIndex], " h=", dt:height[rowIndex], " d=", distances[irow], "\!n" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;/*:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;ALFRED w=99 h=64 d=4.12310562561766&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;CHRIS w=99 h=64 d=4.12310562561766&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;MARK w=104 h=62 d=4.47213595499958&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;KATIE w=95 h=59 d=5.09901951359278&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so d=4.123 is sqrt((100-99)^2+(60-64)^2).&amp;nbsp; By the time Katie was discovered, the radius of 5 was exceeded, so the requested 10 results were limited by the radius. &lt;/P&gt;&lt;P&gt;KDTable works with K dimensional data; you might only need K=1 (just weight, for example) or K=3 (include age as well).&amp;nbsp; The scaling/normalizing issue is more obvious with age in this data, which has a much smaller range than height or weight.&amp;nbsp; Is the distance from 13 years old to 14 years old more or less than the distance from 75 pounds to 80 pounds?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: With just weight, it looks even simpler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;dt = Open( "$sample_data/big class.jmp" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// create the lookup table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;lookup = KDTable( dt:weight &amp;lt;&amp;lt; getasmatrix );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// do an example lookup: find the 10 nearest people to a weight of 100 pounds &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;{rowNumbers, distances} = lookup &amp;lt;&amp;lt; knearestrows( {10, 5}, [100] );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// display the results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;For( irow = 1, irow &amp;lt;= N Cols( rowNumbers ), irow++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; rowIndex = rowNumbers[irow];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; Write( dt:name[rowIndex], " w=", dt:weight[rowIndex], " d=", distances[irow], "\!n" );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;/*:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;ALFRED w=99 d=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;CHRIS w=99 d=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;JOHN w=98 d=2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;MARK w=104 d=4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;KATIE w=95 d=5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;JOE w=105 d=5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;MICHAEL w=95 d=5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;CLAY w=105 d=5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;DANNY w=106 d=6&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 14:07:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16365#M14907</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-01-21T14:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16366#M14908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the slow response; I got caught up on something else.&amp;nbsp; I initially tried your second solution, but I can not get it to work at all.&amp;nbsp; I can't even get it to locate the minimum value of the column...&amp;nbsp; What's going on?&amp;nbsp; I noticed that my column was a string column, not a numeric column, so I converted it, but that didn't seem to help any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;dtFile1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"X_location"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;data type&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Numeric"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;col &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; dtFile1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"X_location"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;rows &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Loc Min&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(((&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;col&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;getValues&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)))&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 16:42:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16366#M14908</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-29T16:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16367#M14909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use &lt;/P&gt;&lt;P&gt;col = Column( dtFile1, "X_location" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JMP objects (like the data table in dtFile1) usually silently ignore messages (like &amp;lt;&amp;lt;column(...) ) that they don't understand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 17:48:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16367#M14909</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-01-29T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Search for Nearest Value</title>
      <link>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16368#M14910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help!&amp;nbsp; It works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 19:50:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Search-for-Nearest-Value/m-p/16368#M14910</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-29T19:50:30Z</dc:date>
    </item>
  </channel>
</rss>

