<?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: Find the nth Word in a String</title>
	<atom:link href="http://www.automateexcel.com/2008/10/31/find-the-nth-word-in-a-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automateexcel.com/2008/10/31/find-the-nth-word-in-a-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: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.automateexcel.com/2008/10/31/find-the-nth-word-in-a-string/comment-page-1/#comment-1376</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Sun, 13 Dec 2009 05:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1101#comment-1376</guid>
		<description>Here is a much shorter function to do this...

Function Find_Nth_Word(Phrase As String, N As Long) As String
  On Error Resume Next
  Find_Nth_Word = Split(WorksheetFunction.Trim(Phrase))(N - 1)
End Function</description>
		<content:encoded><![CDATA[<p>Here is a much shorter function to do this&#8230;</p>
<p>Function Find_Nth_Word(Phrase As String, N As Long) As String<br />
  On Error Resume Next<br />
  Find_Nth_Word = Split(WorksheetFunction.Trim(Phrase))(N &#8211; 1)<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.automateexcel.com/2008/10/31/find-the-nth-word-in-a-string/comment-page-1/#comment-988</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 31 Oct 2008 16:52:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1101#comment-988</guid>
		<description>This might be simpler and more reliable:

Function Find_Nth_Word(sPhrase As String, iWord As Long) As String
  Dim vPhrase As Variant
  Dim iLen As Long
  
  sPhrase = Trim$(sPhrase)
  Do
    iLen = Len(sPhrase)
    sPhrase = Replace(sPhrase, &quot;  &quot;, &quot; &quot;)
    If iLen = Len(sPhrase) Then Exit Do
  Loop
  vPhrase = Split(sPhrase, &quot; &quot;)
  If iWord - 1 &lt;= UBound(vPhrase) Then
    Find_Nth_Word = vPhrase(iWord - 1)
  End If
End Function</description>
		<content:encoded><![CDATA[<p>This might be simpler and more reliable:</p>
<p>Function Find_Nth_Word(sPhrase As String, iWord As Long) As String<br />
  Dim vPhrase As Variant<br />
  Dim iLen As Long</p>
<p>  sPhrase = Trim$(sPhrase)<br />
  Do<br />
    iLen = Len(sPhrase)<br />
    sPhrase = Replace(sPhrase, &#8221;  &#8220;, &#8221; &#8220;)<br />
    If iLen = Len(sPhrase) Then Exit Do<br />
  Loop<br />
  vPhrase = Split(sPhrase, &#8221; &#8220;)<br />
  If iWord &#8211; 1 &lt;= UBound(vPhrase) Then<br />
    Find_Nth_Word = vPhrase(iWord &#8211; 1)<br />
  End If<br />
End Function</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.208 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-15 15:45:07 -->
