<?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: Find Text in a String (instr)</title>
	<atom:link href="http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/</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: Nev</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-1461</link>
		<dc:creator>Nev</dc:creator>
		<pubDate>Sat, 06 Mar 2010 14:17:03 +0000</pubDate>
		<guid isPermaLink="false">#comment-1461</guid>
		<description>good test dajomu,
the author clearly needs to correct his tutorial

abc,a returns 1
abc,b returns 2
abc,c, returns 3</description>
		<content:encoded><![CDATA[<p>good test dajomu,<br />
the author clearly needs to correct his tutorial</p>
<p>abc,a returns 1<br />
abc,b returns 2<br />
abc,c, returns 3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prinny</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-1456</link>
		<dc:creator>Prinny</dc:creator>
		<pubDate>Thu, 04 Mar 2010 00:43:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-1456</guid>
		<description>inst() returns the first position in the string where the string matches.
 Instr(“abc”,”b”)  &#039;Returns 2, b is the second letter.
 Instr(“abcbcab”, “b”) &#039;Returns 2
 Instr(“abcbcabf”, “f”) &#039;Returns 8

When no value is found it returns 0

If you use multiple characters aka &quot;String&quot;, it will tell where the first position begins.

Ie. Instr(&quot;12345678901234567890&quot;, &quot;456&quot;) &#039;returns 4

If you are lookin for every instance? you will need be make loops to keep checking until 0 is found.

Instr(&quot;starting # position&quot;, &quot;original text&quot;, &quot;search text&quot;)</description>
		<content:encoded><![CDATA[<p>inst() returns the first position in the string where the string matches.<br />
 Instr(“abc”,”b”)  &#8216;Returns 2, b is the second letter.<br />
 Instr(“abcbcab”, “b”) &#8216;Returns 2<br />
 Instr(“abcbcabf”, “f”) &#8216;Returns 8</p>
<p>When no value is found it returns 0</p>
<p>If you use multiple characters aka &#8220;String&#8221;, it will tell where the first position begins.</p>
<p>Ie. Instr(&#8220;12345678901234567890&#8243;, &#8220;456&#8243;) &#8216;returns 4</p>
<p>If you are lookin for every instance? you will need be make loops to keep checking until 0 is found.</p>
<p>Instr(&#8220;starting # position&#8221;, &#8220;original text&#8221;, &#8220;search text&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-1454</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Tue, 02 Mar 2010 14:00:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-1454</guid>
		<description>No. MsgBox Instr(&quot;abc&quot;, &quot;b&quot;) returns 2.</description>
		<content:encoded><![CDATA[<p>No. MsgBox Instr(&#8220;abc&#8221;, &#8220;b&#8221;) returns 2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dajomu</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-1446</link>
		<dc:creator>dajomu</dc:creator>
		<pubDate>Wed, 17 Feb 2010 10:10:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-1446</guid>
		<description>MsgBox Inst(“abc”,”a”) ‘returns 1
but will
MsgBox Inst(“abc”,”b”) also return 1?</description>
		<content:encoded><![CDATA[<p>MsgBox Inst(“abc”,”a”) ‘returns 1<br />
but will<br />
MsgBox Inst(“abc”,”b”) also return 1?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-1279</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Wed, 15 Jul 2009 19:51:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-1279</guid>
		<description>Instr() will return an int of the position of the result and will return 0 when it does not exist, e.g.
MsgBox Inst(&quot;abc&quot;,&quot;a&quot;) &#039;returns 1
MsgBox Inst(&quot;abc&quot;,&quot;x&quot;) &#039;returns 0

Therefore the if statement is still valid.</description>
		<content:encoded><![CDATA[<p>Instr() will return an int of the position of the result and will return 0 when it does not exist, e.g.<br />
MsgBox Inst(&#8220;abc&#8221;,&#8221;a&#8221;) &#8216;returns 1<br />
MsgBox Inst(&#8220;abc&#8221;,&#8221;x&#8221;) &#8216;returns 0</p>
<p>Therefore the if statement is still valid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-1272</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 01 Jul 2009 15:31:22 +0000</pubDate>
		<guid isPermaLink="false">#comment-1272</guid>
		<description>How come two corrections to the example were noted (years old) and no change was made to the page?  In one case, the description of the function in question was plain wrong (# of time found vs. position within string), and within the other, it noted that the extended example wasn&#039;t needed since the function already did the desired test if you simply used an optional parameter.  Is no one actually reading the reader responses?</description>
		<content:encoded><![CDATA[<p>How come two corrections to the example were noted (years old) and no change was made to the page?  In one case, the description of the function in question was plain wrong (# of time found vs. position within string), and within the other, it noted that the extended example wasn&#8217;t needed since the function already did the desired test if you simply used an optional parameter.  Is no one actually reading the reader responses?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eminent_eddie</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-436</link>
		<dc:creator>eminent_eddie</dc:creator>
		<pubDate>Thu, 31 Jul 2008 08:42:30 +0000</pubDate>
		<guid isPermaLink="false">#comment-436</guid>
		<description>Instr() returns the position of the first occurrence of one string within another. Not the amount of times the string is found.

cheers.
ed</description>
		<content:encoded><![CDATA[<p>Instr() returns the position of the first occurrence of one string within another. Not the amount of times the string is found.</p>
<p>cheers.<br />
ed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymous</title>
		<link>http://www.automateexcel.com/2004/08/14/excel_vba_find_text_in_a_string_instr/comment-page-1/#comment-30</link>
		<dc:creator>anonymous</dc:creator>
		<pubDate>Tue, 10 Jan 2006 13:26:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-30</guid>
		<description>InStr() allows for a fourth [optional] argument.  to our advantage setting this argument to vbTextCompare makes the string search case-insensitive &lt;br /&gt;
&lt;br /&gt;
ie,  &lt;br /&gt;
MsgBox InStr(UCase(&quot;Look in this string&quot;), UCase(&quot;look&quot;))&lt;br /&gt;
 should return the same as  &lt;br /&gt;
MsgBox InStr(&quot;Look in this string&quot;, &quot;look&quot;, vbTextCompare)&lt;br /&gt;
</description>
		<content:encoded><![CDATA[<p>InStr() allows for a fourth [optional] argument.  to our advantage setting this argument to vbTextCompare makes the string search case-insensitive </p>
<p>ie,  <br />
MsgBox InStr(UCase(&#8220;Look in this string&#8221;), UCase(&#8220;look&#8221;))<br />
 should return the same as  <br />
MsgBox InStr(&#8220;Look in this string&#8221;, &#8220;look&#8221;, vbTextCompare)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.223 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-17 02:37:03 -->
