<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: IsHex Function</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 18:06:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: AntoineLB</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44446</link>
		<dc:creator>AntoineLB</dc:creator>
		<pubDate>Wed, 10 Mar 2010 02:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44446</guid>
		<description>&lt;p&gt;Same behaviour for uro symbol here. Tested with ¥en too.&lt;/p&gt;
&lt;p&gt;?123.456 + 23.55&lt;br&gt;
0.456 0.55 &lt;/p&gt;
&lt;p&gt;My intuition was 123 and 23 were both valid parameter names. First char is neither numeric nor reserved prefix / suffix. To test this, in immediate window&lt;/p&gt;
&lt;p&gt;123=&quot;poiuyt&quot;&lt;br&gt;
?123.456 + 23.55 gives poiuyt{Space}0.456{Space}{Space}0.55&lt;/p&gt;
&lt;p&gt;123=&quot;poiuyt&quot;&lt;br&gt;
23 = &quot;mlkjhg&quot;&lt;br&gt;
?123.456 + 23.55 yields an error but&lt;/p&gt;
&lt;p&gt;123=&quot;poiuyt&quot;&lt;br&gt;
23 = &quot;mlkjhg&quot;&lt;br&gt;
?123.456 &amp; 23.55 gives poiuyt0.456mlkjhg{Space}0.55&lt;/p&gt;
&lt;p&gt;It doesn&#039;t work with $ as US dollar symbol is a reserved suffix for string parameter. &lt;/p&gt;
&lt;p&gt;Same behaviour for any non reserved chars (ANSI &amp; UNICODE) map upto &amp;hFF ie&lt;/p&gt;
&lt;p&gt;?{Any non reserved char}123.456 + {Any non reserved char}23.55&lt;br&gt;
0.456 0.55&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Same behaviour for uro symbol here. Tested with ¥en too.</p>
<p>?123.456 + 23.55<br />
0.456 0.55 </p>
<p>My intuition was 123 and 23 were both valid parameter names. First char is neither numeric nor reserved prefix / suffix. To test this, in immediate window</p>
<p>123=&#8221;poiuyt&#8221;<br />
?123.456 + 23.55 gives poiuyt{Space}0.456{Space}{Space}0.55</p>
<p>123=&#8221;poiuyt&#8221;<br />
23 = &#8220;mlkjhg&#8221;<br />
?123.456 + 23.55 yields an error but</p>
<p>123=&#8221;poiuyt&#8221;<br />
23 = &#8220;mlkjhg&#8221;<br />
?123.456 &amp; 23.55 gives poiuyt0.456mlkjhg{Space}0.55</p>
<p>It doesn&#8217;t work with $ as US dollar symbol is a reserved suffix for string parameter. </p>
<p>Same behaviour for any non reserved chars (ANSI &amp; UNICODE) map upto &amp;hFF ie</p>
<p>?{Any non reserved char}123.456 + {Any non reserved char}23.55<br />
0.456 0.55</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44307</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Tue, 02 Mar 2010 16:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44307</guid>
		<description>&lt;p&gt;@Nile&lt;/p&gt;
&lt;p&gt;Interesting... the &quot;£&quot; symbol attached to the front of a floating point number does the same thing on my &quot;US Locale&quot; computer as well; namely, return the decimal portion of the number. However, it seems to only work when physically attached to the number... I can&#039;t find anyway to concatenate that symbol onto a floating point number (using CDbl, Val, Evaluate, etc.) in order to force it to return just the decimal part of the number.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Nile</p>
<p>Interesting&#8230; the &#8220;£&#8221; symbol attached to the front of a floating point number does the same thing on my &#8220;US Locale&#8221; computer as well; namely, return the decimal portion of the number. However, it seems to only work when physically attached to the number&#8230; I can&#8217;t find anyway to concatenate that symbol onto a floating point number (using CDbl, Val, Evaluate, etc.) in order to force it to return just the decimal part of the number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nile</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44306</link>
		<dc:creator>Nile</dc:creator>
		<pubDate>Tue, 02 Mar 2010 15:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44306</guid>
		<description>&lt;p&gt;I think that the dollar sign once denoted strings, but there&#039;s bno support for it now.&lt;/p&gt;
&lt;p&gt;Likewise the hash symbol &#039;#&#039; has no value as a prefic - but it remains the delimiter around a date:&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;
&lt;p&gt;On a PC with the locale set to &#039;United Kingdom&#039;, our local currency sign &#039;£&#039; does... Something. Try evaluating these expressions in the immediate pane and see what you get:&lt;/p&gt;
&lt;p&gt;?£123&lt;br&gt;
       [returns an empty string]&lt;/p&gt;
&lt;p&gt;?£123.456&lt;br&gt;
 0.456 &lt;/p&gt;
&lt;p&gt;?£123.000&lt;br&gt;
 0 &lt;/p&gt;
&lt;p&gt;?£123.456 + £23.55&lt;br&gt;
 0.456  0.55 &lt;/p&gt;
&lt;p&gt;So it seems to me that the Pound sign is some kind of type suffix - although it&#039;s just as likely to be an undocumented operator.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think that the dollar sign once denoted strings, but there&#8217;s bno support for it now.</p>
<p>Likewise the hash symbol &#8216;#&#8217; has no value as a prefic &#8211; but it remains the delimiter around a date:</p>
<p>?</p>
<p>On a PC with the locale set to &#8216;United Kingdom&#8217;, our local currency sign &#8216;£&#8217; does&#8230; Something. Try evaluating these expressions in the immediate pane and see what you get:</p>
<p>?£123<br />
       [returns an empty string]</p>
<p>?£123.456<br />
 0.456 </p>
<p>?£123.000<br />
 0 </p>
<p>?£123.456 + £23.55<br />
 0.456  0.55 </p>
<p>So it seems to me that the Pound sign is some kind of type suffix &#8211; although it&#8217;s just as likely to be an undocumented operator.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44298</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Tue, 02 Mar 2010 05:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44298</guid>
		<description>&lt;p&gt;@Dick,&lt;/p&gt;
&lt;p&gt;I almost missed your ending question... yes, there is one other that I am aware of... &amp;O or just a leading &amp; by itself... this is an apparent throw back to ancient times as it will interpret the digits following it as Octal (only the digits zero through 7 may follow the &amp;O or leading &amp;).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Dick,</p>
<p>I almost missed your ending question&#8230; yes, there is one other that I am aware of&#8230; &amp;O or just a leading &amp; by itself&#8230; this is an apparent throw back to ancient times as it will interpret the digits following it as Octal (only the digits zero through 7 may follow the &amp;O or leading &amp;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44297</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Tue, 02 Mar 2010 05:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44297</guid>
		<description>&lt;p&gt;@dermotb... That may be one of the few places where IsNumeric works as one would want it to. Interesting, though, is that IsNumeric will verify a string as being a hexidecimal number if it contains up to 16 hex-digts (&quot;&amp;H&quot; &amp; &quot;FFFFFFFFFFFFFFFF&quot; is the maximum hex number IsNumeric will return True for) whereas the largest hex number you can form using &amp;H is only 8 hex-digits long (&amp;HFFFFFFFF is apparently the largest hex number that VB will recognize).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@dermotb&#8230; That may be one of the few places where IsNumeric works as one would want it to. Interesting, though, is that IsNumeric will verify a string as being a hexidecimal number if it contains up to 16 hex-digts (&#8220;&amp;H&#8221; &amp; &#8220;FFFFFFFFFFFFFFFF&#8221; is the maximum hex number IsNumeric will return True for) whereas the largest hex number you can form using &amp;H is only 8 hex-digits long (&amp;HFFFFFFFF is apparently the largest hex number that VB will recognize).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44296</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Tue, 02 Mar 2010 05:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44296</guid>
		<description>&lt;p&gt;I meant to point out that the reason I posted the function that I did is because it has virtually no limit to the number of hex-digits the argument can contain. Well, of course there is a limit... approximately 2 billion hex-digits... but that is, for all practicality, a virtually unlimited maximum number of hex-digits.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I meant to point out that the reason I posted the function that I did is because it has virtually no limit to the number of hex-digits the argument can contain. Well, of course there is a limit&#8230; approximately 2 billion hex-digits&#8230; but that is, for all practicality, a virtually unlimited maximum number of hex-digits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44292</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Tue, 02 Mar 2010 01:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44292</guid>
		<description>&lt;p&gt;Here is another IsHex function (a one-liner) to consider...&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; IsHex(S &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt;&lt;br&gt;
&#160; IsHex = Len(S) &gt; 0 &lt;span class=&quot;kw1&quot;&gt;And&lt;/span&gt; S &lt;span class=&quot;kw1&quot;&gt;Like&lt;/span&gt; Replace(&lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;(Len(S), &lt;span class=&quot;st0&quot;&gt;&quot;X&quot;&lt;/span&gt;), &lt;span class=&quot;st0&quot;&gt;&quot;X&quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&quot;[0-9A-Fa-f]&quot;&lt;/span&gt;)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Here is another IsHex function (a one-liner) to consider&#8230;</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Function</span> IsHex(S <span class="kw1">As</span> <span class="kw1">String</span>) <span class="kw1">As</span> <span class="kw1">Boolean</span><br />
&nbsp; IsHex = Len(S) &gt; 0 <span class="kw1">And</span> S <span class="kw1">Like</span> Replace(<span class="kw1">String</span>(Len(S), <span class="st0">&#8220;X&#8221;</span>), <span class="st0">&#8220;X&#8221;</span>, <span class="st0">&#8220;[0-9A-Fa-f]&#8220;</span>)<br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: dermotb</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44289</link>
		<dc:creator>dermotb</dc:creator>
		<pubDate>Tue, 02 Mar 2010 00:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44289</guid>
		<description>&lt;p&gt;how about&lt;br&gt;
IsHex = IsNumeric(&quot;&amp;H&quot; &amp; sInput)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>how about<br />
IsHex = IsNumeric(&#8220;&amp;H&#8221; &amp; sInput)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Walkenbach</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44288</link>
		<dc:creator>John Walkenbach</dc:creator>
		<pubDate>Tue, 02 Mar 2010 00:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44288</guid>
		<description>&lt;p&gt;Not as elegant, but more understandable perhaps:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; IsHex(sInput &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt;&lt;br&gt;
&#160; IsHex = &lt;span class=&quot;kw1&quot;&gt;Not&lt;/span&gt; (Application.IsError(Application.Hex2Dec(sInput)))&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It won&#039;t work with versions before Excel 2007.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Not as elegant, but more understandable perhaps:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Function</span> IsHex(sInput <span class="kw1">As</span> <span class="kw1">String</span>) <span class="kw1">As</span> <span class="kw1">Boolean</span><br />
&nbsp; IsHex = <span class="kw1">Not</span> (Application.IsError(Application.Hex2Dec(sInput)))<br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
<p>It won&#8217;t work with versions before Excel 2007.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/03/01/ishex-function/#comment-44287</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Mon, 01 Mar 2010 23:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3631#comment-44287</guid>
		<description>&lt;p&gt;Nope, no good.  It fails on &quot;00?.&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Public&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; IsHex(sInput &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; lResult &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;On&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Resume&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; lResult = &lt;span class=&quot;kw1&quot;&gt;CLng&lt;/span&gt;(&lt;span class=&quot;st0&quot;&gt;&quot;&amp;H&quot;&lt;/span&gt; &amp; sInput)&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;br&gt;
&#160; &#160; IsHex = (Len(Replace(sInput, &lt;span class=&quot;st0&quot;&gt;&quot;0&quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;)) = 0) &lt;span class=&quot;kw1&quot;&gt;Or&lt;/span&gt; (lResult &gt; 0)&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Nope, no good.  It fails on &#8220;00?.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Public</span> <span class="kw1">Function</span> IsHex(sInput <span class="kw1">As</span> <span class="kw1">String</span>) <span class="kw1">As</span> <span class="kw1">Boolean</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">Dim</span> lResult <span class="kw1">As</span> <span class="kw1">Long</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">Resume</span> <span class="kw1">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; lResult = <span class="kw1">CLng</span>(<span class="st0">&#8220;&amp;H&#8221;</span> &amp; sInput)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; IsHex = (Len(Replace(sInput, <span class="st0">&#8220;0&#8243;</span>, <span class="st0">&#8220;&#8221;</span>)) = 0) <span class="kw1">Or</span> (lResult &gt; 0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
</channel>
</rss>

