<?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: Pattern Matching</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:32:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-63351</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Mon, 09 May 2011 01:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-63351</guid>
		<description>&lt;p&gt;The documentation link in the article no longer works.&lt;br&gt;
I found it here: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/6wzad2b2(VS.85).aspx&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/6wzad2b2&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/6wzad2b2&lt;/a&gt;(VS.85).aspx&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The documentation link in the article no longer works.<br />
I found it here: <a href="http://msdn.microsoft.com/en-us/library/6wzad2b2(VS.85).aspx" rel="nofollow"></a><a href="http://msdn.microsoft.com/en-us/library/6wzad2b2" rel="nofollow">http://msdn.microsoft.com/en-us/library/6wzad2b2</a>(VS.85).aspx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danio</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-60019</link>
		<dc:creator>Danio</dc:creator>
		<pubDate>Mon, 28 Feb 2011 14:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-60019</guid>
		<description>&lt;p&gt;OY!!&lt;/p&gt;
&lt;p&gt;I&#039;m having a really hard time doing a simple thing.... I just need to check whether the length of a number in Cell A is less or equal to 13 digits and then have Cell B&#039;s value be one of 2 things ...&lt;br&gt;
PS.  I haven&#039;t used any excel since school&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>OY!!</p>
<p>I&#8217;m having a really hard time doing a simple thing&#8230;. I just need to check whether the length of a number in Cell A is less or equal to 13 digits and then have Cell B&#8217;s value be one of 2 things &#8230;<br />
PS.  I haven&#8217;t used any excel since school</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Help getting broken out of field (excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-53917</link>
		<dc:creator>Help getting broken out of field (excel)</dc:creator>
		<pubDate>Tue, 09 Nov 2010 22:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-53917</guid>
		<description>&lt;p&gt;[...] can get it to work in 2003 (We&#039;ve got 2000, really keeping up on the features here). Take a look at Daily Dose of Excel ª Blog Archive ª Pattern Matching which seems to have a pretty easy user defined function for pattern matching.       Wolffy, [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] can get it to work in 2003 (We&#8217;ve got 2000, really keeping up on the features here). Take a look at Daily Dose of Excel ª Blog Archive ª Pattern Matching which seems to have a pretty easy user defined function for pattern matching.       Wolffy, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eivind</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-51924</link>
		<dc:creator>Eivind</dc:creator>
		<pubDate>Wed, 06 Oct 2010 20:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-51924</guid>
		<description>&lt;p&gt;Thank you very much, this was really helpful.&lt;/p&gt;
&lt;p&gt;The code is looping through a list of URLs that are generated from Google Analytics using arrays.&lt;br&gt;
The list is ordered from highest to lowest pageview number. Since I don&#039;t know how many URLs the list will contain, some of the cells will show #N/A instead of he URL and pageview number.&lt;/p&gt;
&lt;p&gt;Example:&lt;br&gt;
URL      Pageview&lt;br&gt;
/url-1   10&lt;br&gt;
/url-2   7&lt;br&gt;
#N/A     #N/A&lt;/p&gt;
&lt;p&gt;This made the code not working, so I added some On Error Resume Next to fix the problem. The code is below, and it is working, but if you see anything that should be different, please let me know.&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;Dim&lt;/span&gt; reg &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;New&lt;/span&gt; RegExp&lt;br&gt;
&#160;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Public&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; RegSum(Source &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, Pattern &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, SumRange &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; IgnoreCase &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt; = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; MultiLine &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt; = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Double&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; rng &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, i &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, j &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, dbl &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Double&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; reg&lt;br&gt;
&#160; &#160; &#160; &#160; .IgnoreCase = IgnoreCase&lt;br&gt;
&#160; &#160; &#160; &#160; .MultiLine = MultiLine&lt;br&gt;
&#160; &#160; &#160; &#160; .Pattern = Pattern&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt;&lt;br&gt;
&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; &lt;br&gt;
&#160; &#160; dbl = 0&lt;br&gt;
&#160; &#160; &#160; &#160;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; Source.Rows.Count&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; Err.Number = 0 &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; j = 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; Source.Columns.Count&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; reg.Test(Source(i, j).Value) &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; dbl = dbl + SumRange(i, j).Value&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; &#160; RegSum = dbl&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;Again, thank you very much for your help.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you very much, this was really helpful.</p>
<p>The code is looping through a list of URLs that are generated from Google Analytics using arrays.<br />
The list is ordered from highest to lowest pageview number. Since I don&#8217;t know how many URLs the list will contain, some of the cells will show #N/A instead of he URL and pageview number.</p>
<p>Example:<br />
URL      Pageview<br />
/url-1   10<br />
/url-2   7<br />
#N/A     #N/A</p>
<p>This made the code not working, so I added some On Error Resume Next to fix the problem. The code is below, and it is working, but if you see anything that should be different, please let me know.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Dim</span> reg <span class="kw1">As</span> <span class="kw1">New</span> RegExp<br />
&nbsp;</p>
<p><span class="kw1">Public</span> <span class="kw1">Function</span> RegSum(Source <span class="kw1">As</span> Range, Pattern <span class="kw1">As</span> <span class="kw1">String</span>, SumRange <span class="kw1">As</span> Range, <span class="kw1">Optional</span> IgnoreCase <span class="kw1">As</span> <span class="kw1">Boolean</span> = <span class="kw1">True</span>, <span class="kw1">Optional</span> MultiLine <span class="kw1">As</span> <span class="kw1">Boolean</span> = <span class="kw1">True</span>) <span class="kw1">As</span> <span class="kw1">Double</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> rng <span class="kw1">As</span> Range, i <span class="kw1">As</span> <span class="kw1">Long</span>, j <span class="kw1">As</span> <span class="kw1">Long</span>, dbl <span class="kw1">As</span> <span class="kw1">Double</span></p>
<p>&nbsp; &nbsp; <span class="kw1">With</span> reg<br />
&nbsp; &nbsp; &nbsp; &nbsp; .IgnoreCase = IgnoreCase<br />
&nbsp; &nbsp; &nbsp; &nbsp; .MultiLine = MultiLine<br />
&nbsp; &nbsp; &nbsp; &nbsp; .Pattern = Pattern<br />
&nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">With</span></p>
<p>&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; <br />
&nbsp; &nbsp; dbl = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span class="kw1">For</span> i = 1 <span class="kw1">To</span> Source.Rows.Count<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> Err.Number = 0 <span class="kw1">Then</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">For</span> j = 1 <span class="kw1">To</span> Source.Columns.Count<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> reg.Test(Source(i, j).Value) <span class="kw1">Then</span> dbl = dbl + SumRange(i, j).Value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
&nbsp; &nbsp; <span class="kw1">Next</span><br />
&nbsp; &nbsp; RegSum = dbl<br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
<p>Again, thank you very much for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-51903</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Wed, 06 Oct 2010 09:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-51903</guid>
		<description>&lt;p&gt;A quick helper function. You can adjust to fit:&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; RegSum(Source &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, Pattern &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, SumRange &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; IgnoreCase &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt; = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; MultiLine &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt; = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Double&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; rng &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, i &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, j &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, dbl &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Double&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; reg.IgnoreCase = IgnoreCase&lt;br&gt;
&#160; &#160; reg.MultiLine = MultiLine&lt;br&gt;
&#160; &#160; reg.Pattern = Pattern&lt;br&gt;
&lt;br&gt;
&#160; &#160; dbl = 0&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; Source.Rows.Count&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; j = 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; Source.Columns.Count&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; reg.test(Source(i, j).Value) &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; dbl = dbl + SumRange(i, j).Value&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; &#160; RegSum = dbl&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;A3 = ^New York$&lt;br&gt;
A6:A8 = New York, New Year, New York&lt;br&gt;
B6:B8 = 5, 6, 10&lt;/p&gt;
&lt;p&gt;Function call&lt;br&gt;
=RegSum(A6:A8, A3, B6:B8)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>A quick helper function. You can adjust to fit:</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> RegSum(Source <span class="kw1">As</span> Range, Pattern <span class="kw1">As</span> <span class="kw1">String</span>, SumRange <span class="kw1">As</span> Range, <span class="kw1">Optional</span> IgnoreCase <span class="kw1">As</span> <span class="kw1">Boolean</span> = <span class="kw1">True</span>, <span class="kw1">Optional</span> MultiLine <span class="kw1">As</span> <span class="kw1">Boolean</span> = <span class="kw1">True</span>) <span class="kw1">As</span> <span class="kw1">Double</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> rng <span class="kw1">As</span> Range, i <span class="kw1">As</span> <span class="kw1">Long</span>, j <span class="kw1">As</span> <span class="kw1">Long</span>, dbl <span class="kw1">As</span> <span class="kw1">Double</span></p>
<p>&nbsp; &nbsp; reg.IgnoreCase = IgnoreCase<br />
&nbsp; &nbsp; reg.MultiLine = MultiLine<br />
&nbsp; &nbsp; reg.Pattern = Pattern</p>
<p>&nbsp; &nbsp; dbl = 0<br />
&nbsp; &nbsp; <span class="kw1">For</span> i = 1 <span class="kw1">To</span> Source.Rows.Count<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">For</span> j = 1 <span class="kw1">To</span> Source.Columns.Count<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> reg.test(Source(i, j).Value) <span class="kw1">Then</span> dbl = dbl + SumRange(i, j).Value<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Next</span><br />
&nbsp; &nbsp; <span class="kw1">Next</span><br />
&nbsp; &nbsp; RegSum = dbl<br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
<p>A3 = ^New York$<br />
A6:A8 = New York, New Year, New York<br />
B6:B8 = 5, 6, 10</p>
<p>Function call<br />
=RegSum(A6:A8, A3, B6:B8)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eivind</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-51811</link>
		<dc:creator>Eivind</dc:creator>
		<pubDate>Mon, 04 Oct 2010 19:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-51811</guid>
		<description>&lt;p&gt;Thank you for a very useful example. Although I see it was written in 2005, I still hope somebody can answer my question.&lt;/p&gt;
&lt;p&gt;If I understand this code correctly, as soon as it find a match it will exit the loop. But what if there were several matches, and I want them all summed up. How should the loop be written then?&lt;/p&gt;
&lt;p&gt;Example, I want all instances of New York and the number to be summed up:&lt;/p&gt;
&lt;p&gt;Value&lt;br&gt;
New York 5&lt;br&gt;
New Year 6&lt;br&gt;
New York 10&lt;/p&gt;
&lt;p&gt;The result should be 15. The code example in this article will give me the number 5 and exit the loop. Correct?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you for a very useful example. Although I see it was written in 2005, I still hope somebody can answer my question.</p>
<p>If I understand this code correctly, as soon as it find a match it will exit the loop. But what if there were several matches, and I want them all summed up. How should the loop be written then?</p>
<p>Example, I want all instances of New York and the number to be summed up:</p>
<p>Value<br />
New York 5<br />
New Year 6<br />
New York 10</p>
<p>The result should be 15. The code example in this article will give me the number 5 and exit the loop. Correct?</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: posfan12</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-49421</link>
		<dc:creator>posfan12</dc:creator>
		<pubDate>Fri, 27 Aug 2010 04:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-49421</guid>
		<description>&lt;p&gt;Excel 2002, rather. Even less common... :(&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Excel 2002, rather. Even less common&#8230; <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: posfan12</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-49420</link>
		<dc:creator>posfan12</dc:creator>
		<pubDate>Fri, 27 Aug 2010 04:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-49420</guid>
		<description>&lt;p&gt;I&#039;m running into problems where Excel complains about &quot;RegExp&quot; being an undefined user data type.&lt;/p&gt;
&lt;p&gt;Not sure what is going wrong, but I&#039;m running Excel 2003 on Windows 7 64-bit, which is probably not a common setup. :(&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m running into problems where Excel complains about &#8220;RegExp&#8221; being an undefined user data type.</p>
<p>Not sure what is going wrong, but I&#8217;m running Excel 2003 on Windows 7 64-bit, which is probably not a common setup. <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Phillips</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-43448</link>
		<dc:creator>Bob Phillips</dc:creator>
		<pubDate>Wed, 20 Jan 2010 15:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-43448</guid>
		<description>&lt;p&gt;Also, someone recently posted that MOREFUNC can fail in Excel 2007. Haven&#039;t tried it myself, have never used MOREFUNC, but if that is correct it validates my decision.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Also, someone recently posted that MOREFUNC can fail in Excel 2007. Haven&#8217;t tried it myself, have never used MOREFUNC, but if that is correct it validates my decision.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/#comment-43430</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Tue, 19 Jan 2010 04:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1213#comment-43430</guid>
		<description>&lt;p&gt;@fzz...&lt;/p&gt;
&lt;p&gt;==&gt; then better still to use MOREFUNC.XLL regular expressions.&lt;/p&gt;
&lt;p&gt;I still like rolling my own code... and the function I came up with is relatively short... plus, in my opinion, will be easier to read next week than the regular expression pattern will be. [grin]&lt;/p&gt;
&lt;p&gt;==&gt; but why Ä¶ &amp; Äú-Äù &amp; Äú*Äù &amp; Äú-Äù &amp; Ä¶ rather than&lt;br&gt;
==&gt; Ä¶ &amp; Äú-*-Äù &amp; Ä¶  in the first Replace call?&lt;/p&gt;
&lt;p&gt;I originally had Chr$(1) instead of the dashes; then I did a Replace on the Chr$(1) and replaced them with &quot;-&quot;; then I noticed I could replace the &quot;-&quot;&amp;&quot;*&quot;&amp;&quot;-&quot; with &quot;-*-&quot;, which I did by hand... and, of course, I missed one of them.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@fzz&#8230;</p>
<p>==&gt; then better still to use MOREFUNC.XLL regular expressions.</p>
<p>I still like rolling my own code&#8230; and the function I came up with is relatively short&#8230; plus, in my opinion, will be easier to read next week than the regular expression pattern will be. [grin]</p>
<p>==&gt; but why Ä¶ &amp; Äú-Äù &amp; Äú*Äù &amp; Äú-Äù &amp; Ä¶ rather than<br />
==&gt; Ä¶ &amp; Äú-*-Äù &amp; Ä¶  in the first Replace call?</p>
<p>I originally had Chr$(1) instead of the dashes; then I did a Replace on the Chr$(1) and replaced them with &#8220;-&#8221;; then I noticed I could replace the &#8220;-&#8221;&amp;&#8221;*&#8221;&amp;&#8221;-&#8221; with &#8220;-*-&#8221;, which I did by hand&#8230; and, of course, I missed one of them.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

