<?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: VBA: Extract Number From String</title>
	<atom:link href="http://www.automateexcel.com/2008/11/03/vba-extract-number-from-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automateexcel.com/2008/11/03/vba-extract-number-from-string/</link>
	<description>Hundreds of Excel Tips &#38; Tricks</description>
	<lastBuildDate>Wed, 10 Mar 2010 07:03:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: FH</title>
		<link>http://www.automateexcel.com/2008/11/03/vba-extract-number-from-string/comment-page-1/#comment-1436</link>
		<dc:creator>FH</dc:creator>
		<pubDate>Mon, 08 Feb 2010 13:49:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1109#comment-1436</guid>
		<description>You have juste to replace the comma by a dot so you have to do a Replace(&quot;Phrase&quot; , &quot;,&quot; , &quot;.&quot;) i think that this should work</description>
		<content:encoded><![CDATA[<p>You have juste to replace the comma by a dot so you have to do a Replace(&#8220;Phrase&#8221; , &#8220;,&#8221; , &#8220;.&#8221;) i think that this should work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.automateexcel.com/2008/11/03/vba-extract-number-from-string/comment-page-1/#comment-1375</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Sun, 13 Dec 2009 05:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1109#comment-1375</guid>
		<description>**IF** the user&#039;s locale uses a **dot** for the decimal point, then here is a much shorter function to do this...

Function Extract_Number_from_Text(Phrase As String) As Double
  Dim X As Long, SubString As String
  For X = 1 To Len(Phrase)
    Extract_Number_from_Text = Val(Mid(Phrase, X))
    If Extract_Number_from_Text Then Exit For
  Next
End Function

I don&#039;t do &quot;non-US locale&quot; programming, so I&#039;m not sure how to deal with non-dot decimal pointed numbers, but perhaps the comma could be replace with a dot inside the Mid function call (although I&#039;m not sure what the Val function will return if you do that).</description>
		<content:encoded><![CDATA[<p>**IF** the user&#8217;s locale uses a **dot** for the decimal point, then here is a much shorter function to do this&#8230;</p>
<p>Function Extract_Number_from_Text(Phrase As String) As Double<br />
  Dim X As Long, SubString As String<br />
  For X = 1 To Len(Phrase)<br />
    Extract_Number_from_Text = Val(Mid(Phrase, X))<br />
    If Extract_Number_from_Text Then Exit For<br />
  Next<br />
End Function</p>
<p>I don&#8217;t do &#8220;non-US locale&#8221; programming, so I&#8217;m not sure how to deal with non-dot decimal pointed numbers, but perhaps the comma could be replace with a dot inside the Mid function call (although I&#8217;m not sure what the Val function will return if you do that).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.249 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-19 01:35:34 -->
