<?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: Least Common Pathinator</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jan Chan</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20834</link>
		<dc:creator>Jan Chan</dc:creator>
		<pubDate>Tue, 05 Sep 2006 10:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20834</guid>
		<description>&lt;p&gt;Zach if you are having trouble getting to grips with recursion try to read this simple example.&lt;br&gt;
Its a bit heavy on the annotation but I guess that helps.&lt;br&gt;
I am not entirely happy with it, as it could do with a proper termination flag but I didn&#039;t want to make it too complicated to understand. I have tried to keep it as close to the examples above so the format is easier to pickup.&lt;/p&gt;
&lt;p&gt;Just think about it as retracing your steps, and leaving behind some of the baggage you came with.&lt;/p&gt;
&lt;p&gt;Function PathFinder(Path1, Path2, Optional PathDelimit As String = &quot;&quot;) As String&#160;&#160;&#160;&#160;Dim strResult As String&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;If Left(Path1, 1) = Left(Path2, 1) And (Path1  &quot;&quot; Or Path2  &quot;&quot;) Then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; The string looks the same so far...&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; go to the next character&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;strResult = PathFinder(Mid(Path1, 2), Mid(Path2, 2), PathDelimit)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;If strResult = &quot;&quot; Then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; The end of the road no futher matches found.....&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;If Left(Path1, 1) = PathDelimit Then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; We have found the end of the matches and we retraced our way back to the delimiter&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; stick the delimiter on to the results&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; Basically anything would have done here but I must not return an empty string.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;PathFinder = PathDelimit &#039; note path1 = path2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Else&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; We have found the end of the matches but we haven&#039;t retraced our way back to a delimiter&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;PathFinder = &quot;&quot;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;End If&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Else&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; Everything is matching now lets just keep adding characters one at a time back to the results.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;PathFinder = Left(Path1, 1) &amp; strResult&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;End If&#160;&#160;&#160;&#160;Else&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039; We have found the end of the road this is the first proper difference.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;PathFinder = &quot;&quot;&#160;&#160;&#160;&#160;End IfEnd Function&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Zach if you are having trouble getting to grips with recursion try to read this simple example.<br />
Its a bit heavy on the annotation but I guess that helps.<br />
I am not entirely happy with it, as it could do with a proper termination flag but I didn&#8217;t want to make it too complicated to understand. I have tried to keep it as close to the examples above so the format is easier to pickup.</p>
<p>Just think about it as retracing your steps, and leaving behind some of the baggage you came with.</p>
<p>Function PathFinder(Path1, Path2, Optional PathDelimit As String = &#8220;&#8221;) As String&nbsp;&nbsp;&nbsp;&nbsp;Dim strResult As String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If Left(Path1, 1) = Left(Path2, 1) And (Path1  &#8220;&#8221; Or Path2  &#8220;&#8221;) Then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; The string looks the same so far&#8230;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; go to the next character&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strResult = PathFinder(Mid(Path1, 2), Mid(Path2, 2), PathDelimit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If strResult = &#8220;&#8221; Then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; The end of the road no futher matches found&#8230;..&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If Left(Path1, 1) = PathDelimit Then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; We have found the end of the matches and we retraced our way back to the delimiter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; stick the delimiter on to the results&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; Basically anything would have done here but I must not return an empty string.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PathFinder = PathDelimit &#8216; note path1 = path2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; We have found the end of the matches but we haven&#8217;t retraced our way back to a delimiter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PathFinder = &#8220;&#8221;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; Everything is matching now lets just keep adding characters one at a time back to the results.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PathFinder = Left(Path1, 1) &amp; strResult&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If&nbsp;&nbsp;&nbsp;&nbsp;Else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8217; We have found the end of the road this is the first proper difference.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PathFinder = &#8220;&#8221;&nbsp;&nbsp;&nbsp;&nbsp;End IfEnd Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Chan</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20833</link>
		<dc:creator>Jan Chan</dc:creator>
		<pubDate>Tue, 05 Sep 2006 10:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20833</guid>
		<description>&lt;p&gt;Zach if you are having trouble getting to grips with recursion try to read this simple example.&lt;br&gt;
Its a bit heavy on the annotation but I guess that helps.&lt;br&gt;
I am not entirely happy with it, as it could do with a proper termination flag but I didn&#039;t want to make it too complicated to understand.  I have tried to keep it as close to the examples above so the format is easier to pickup.&lt;/p&gt;
&lt;p&gt;Just think about it as retracing your steps, and leaving behind some of the baggage you came with.&lt;/p&gt;
&lt;p&gt;Function PathFinder(Path1, Path2, Optional PathDelimit As String = &quot;&quot;) As String&lt;br&gt;
    Dim strResult As String&lt;/p&gt;
&lt;p&gt;    If Left(Path1, 1) = Left(Path2, 1) And (Path1  &quot;&quot; Or Path2  &quot;&quot;) Then&lt;br&gt;
        &#039; The string looks the same so far...&lt;br&gt;
        &#039; go to the next character&lt;br&gt;
        strResult = PathFinder(Mid(Path1, 2), Mid(Path2, 2), PathDelimit)&lt;br&gt;
        If strResult = &quot;&quot; Then&lt;br&gt;
            &#039; The end of the road no futher matches found.....&lt;br&gt;
            If Left(Path1, 1) = PathDelimit Then&lt;br&gt;
                &#039; We have found the end of the matches and we retraced our way back to the delimiter&lt;br&gt;
                &#039; stick the delimiter on to the results&lt;br&gt;
                &#039; Basically anything would have done here but I must not return an empty string.&lt;br&gt;
                PathFinder = PathDelimit &#039; note path1 = path2&lt;br&gt;
            Else&lt;br&gt;
                &#039; We have found the end of the matches but we haven&#039;t retraced our way back to a delimiter&lt;br&gt;
                PathFinder = &quot;&quot;&lt;br&gt;
            End If&lt;br&gt;
        Else&lt;br&gt;
            &#039; Everything is matching now lets just keep adding characters one at a time back to the results.&lt;br&gt;
            PathFinder = Left(Path1, 1) &amp; strResult&lt;br&gt;
        End If&lt;br&gt;
    Else&lt;br&gt;
        &#039; We have found the end of the road this is the first proper difference.&lt;br&gt;
        PathFinder = &quot;&quot;&lt;br&gt;
    End If&lt;br&gt;
End Function&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Zach if you are having trouble getting to grips with recursion try to read this simple example.<br />
Its a bit heavy on the annotation but I guess that helps.<br />
I am not entirely happy with it, as it could do with a proper termination flag but I didn&#8217;t want to make it too complicated to understand.  I have tried to keep it as close to the examples above so the format is easier to pickup.</p>
<p>Just think about it as retracing your steps, and leaving behind some of the baggage you came with.</p>
<p>Function PathFinder(Path1, Path2, Optional PathDelimit As String = &#8220;&#8221;) As String<br />
    Dim strResult As String</p>
<p>    If Left(Path1, 1) = Left(Path2, 1) And (Path1  &#8220;&#8221; Or Path2  &#8220;&#8221;) Then<br />
        &#8216; The string looks the same so far&#8230;<br />
        &#8216; go to the next character<br />
        strResult = PathFinder(Mid(Path1, 2), Mid(Path2, 2), PathDelimit)<br />
        If strResult = &#8220;&#8221; Then<br />
            &#8216; The end of the road no futher matches found&#8230;..<br />
            If Left(Path1, 1) = PathDelimit Then<br />
                &#8216; We have found the end of the matches and we retraced our way back to the delimiter<br />
                &#8216; stick the delimiter on to the results<br />
                &#8216; Basically anything would have done here but I must not return an empty string.<br />
                PathFinder = PathDelimit &#8216; note path1 = path2<br />
            Else<br />
                &#8216; We have found the end of the matches but we haven&#8217;t retraced our way back to a delimiter<br />
                PathFinder = &#8220;&#8221;<br />
            End If<br />
        Else<br />
            &#8216; Everything is matching now lets just keep adding characters one at a time back to the results.<br />
            PathFinder = Left(Path1, 1) &amp; strResult<br />
        End If<br />
    Else<br />
        &#8216; We have found the end of the road this is the first proper difference.<br />
        PathFinder = &#8220;&#8221;<br />
    End If<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Pope</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20762</link>
		<dc:creator>Andy Pope</dc:creator>
		<pubDate>Sat, 26 Aug 2006 10:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20762</guid>
		<description>&lt;p&gt;Thanks Jake.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks Jake.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Marx</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20756</link>
		<dc:creator>Jake Marx</dc:creator>
		<pubDate>Fri, 25 Aug 2006 21:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20756</guid>
		<description>&lt;p&gt;Andy - I fixed your comment for you. You need to use vb and not vba in the tag. :)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br&gt;
Jake&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Andy &#8211; I fixed your comment for you. You need to use vb and not vba in the tag. <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards,<br />
Jake</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zach</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20745</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Fri, 25 Aug 2006 13:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20745</guid>
		<description>&lt;p&gt;Thanks, Tushar.  I did not get through it yet, but it looks like it will do the trick.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks, Tushar.  I did not get through it yet, but it looks like it will do the trick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Pope</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20742</link>
		<dc:creator>Andy Pope</dc:creator>
		<pubDate>Fri, 25 Aug 2006 10:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20742</guid>
		<description>&lt;p&gt;Doh!  I see I used the markup tags from my usual forum rather those that work here.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Doh!  I see I used the markup tags from my usual forum rather those that work here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Pope</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20739</link>
		<dc:creator>Andy Pope</dc:creator>
		<pubDate>Fri, 25 Aug 2006 08:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20739</guid>
		<description>&lt;p&gt;Good catch Tushar.&lt;/p&gt;
&lt;p&gt;Just in case my code caused any confusion regarding recursion, which it does NOT use, I have used a variable to hold the path whilst it is being built.&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; CommonPath2(Path1 &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, Path2 &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;Optional&lt;/span&gt; PathDelimit &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;st0&quot;&gt;&quot;&quot;&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; vntP1 &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; vntP2 &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; lngIndex &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;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; strBuildPath &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; vntP1 = Split(Path1, PathDelimit)&lt;br&gt;
&#160; &#160; vntP2 = Split(Path2, PathDelimit)&lt;br&gt;
&#160; &#160;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; lngIndex = &lt;span class=&quot;kw1&quot;&gt;LBound&lt;/span&gt;(vntP1) &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; WorksheetFunction.Min(&lt;span class=&quot;kw1&quot;&gt;UBound&lt;/span&gt;(vntP1), &lt;span class=&quot;kw1&quot;&gt;UBound&lt;/span&gt;(vntP2))&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; StrComp(vntP1(lngIndex), vntP2(lngIndex), vbTextCompare) &#160;0 &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Exit&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; strBuildPath = strBuildPath &amp; vntP1(lngIndex) &amp; PathDelimit&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; &#160;CommonPath2 = strBuildPath&lt;br&gt;
&#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>Good catch Tushar.</p>
<p>Just in case my code caused any confusion regarding recursion, which it does NOT use, I have used a variable to hold the path whilst it is being built.</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> CommonPath2(Path1 <span class="kw1">As</span> <span class="kw1">String</span>, Path2 <span class="kw1">As</span> <span class="kw1">String</span>, <span class="kw1">Optional</span> PathDelimit <span class="kw1">As</span> <span class="kw1">String</span> = <span class="st0">&#8220;&#8221;</span>) <span class="kw1">As</span> <span class="kw1">String</span></p>
<p>&nbsp; &nbsp; <span class="kw1">Dim</span> vntP1 <span class="kw1">As</span> <span class="kw1">Variant</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> vntP2 <span class="kw1">As</span> <span class="kw1">Variant</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> lngIndex <span class="kw1">As</span> <span class="kw1">Long</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> strBuildPath <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; vntP1 = Split(Path1, PathDelimit)<br />
&nbsp; &nbsp; vntP2 = Split(Path2, PathDelimit)<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span class="kw1">For</span> lngIndex = <span class="kw1">LBound</span>(vntP1) <span class="kw1">To</span> WorksheetFunction.Min(<span class="kw1">UBound</span>(vntP1), <span class="kw1">UBound</span>(vntP2))<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> StrComp(vntP1(lngIndex), vntP2(lngIndex), vbTextCompare) &nbsp;0 <span class="kw1">Then</span> <span class="kw1">Exit</span> <span class="kw1">For</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; strBuildPath = strBuildPath &amp;amp; vntP1(lngIndex) &amp;amp; PathDelimit<br />
&nbsp; &nbsp; <span class="kw1">Next</span><br />
&nbsp; &nbsp;CommonPath2 = strBuildPath<br />
&nbsp; &nbsp;<br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tushar Mehta</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20735</link>
		<dc:creator>Tushar Mehta</dc:creator>
		<pubDate>Fri, 25 Aug 2006 02:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20735</guid>
		<description>&lt;p&gt;Interesting capability.  I wonder where this would be useful.&lt;/p&gt;
&lt;p&gt;Some technical comments:&lt;/p&gt;
&lt;p&gt;Dick: Untested: The &lt;em&gt;For I=&lt;/em&gt; loop should go to Min(Len(Path1),Len(Path2))&lt;/p&gt;
&lt;p&gt;Andy: Also untested: The loop should go to Min(Ubound(vntP1),Ubound(vntP2))&lt;/p&gt;
&lt;p&gt;Zach: Since you asked so nicely {grin}, I expedited a planned reorganization of one section of my website.  See&lt;br&gt;
Recursion&lt;br&gt;
&lt;a href=&quot;http://www.tushar-mehta.com/publish_train/book_vba/07_recursion.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.tushar-mehta.com/publish_train/book_vba/07_recursion.htm&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Interesting capability.  I wonder where this would be useful.</p>
<p>Some technical comments:</p>
<p>Dick: Untested: The <em>For I=</em> loop should go to Min(Len(Path1),Len(Path2))</p>
<p>Andy: Also untested: The loop should go to Min(Ubound(vntP1),Ubound(vntP2))</p>
<p>Zach: Since you asked so nicely {grin}, I expedited a planned reorganization of one section of my website.  See<br />
Recursion<br />
<a href="http://www.tushar-mehta.com/publish_train/book_vba/07_recursion.htm" rel="nofollow">http://www.tushar-mehta.com/publish_train/book_vba/07_recursion.htm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zach</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20733</link>
		<dc:creator>zach</dc:creator>
		<pubDate>Fri, 25 Aug 2006 00:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20733</guid>
		<description>&lt;p&gt;Aargh.  I will bow to the feet of the first person who can explain recursion to me.  I get the concept, it&#039;s just that I get lost when I try to compile the code in my head and keep track of what happens when the function calls itself.&lt;/p&gt;
&lt;p&gt;It looks so simple and elegant, though.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Aargh.  I will bow to the feet of the first person who can explain recursion to me.  I get the concept, it&#8217;s just that I get lost when I try to compile the code in my head and keep track of what happens when the function calls itself.</p>
<p>It looks so simple and elegant, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex J</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/08/24/least-common-pathinator/#comment-20729</link>
		<dc:creator>Alex J</dc:creator>
		<pubDate>Thu, 24 Aug 2006 19:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1489#comment-20729</guid>
		<description>&lt;p&gt;I like Andy&#039;s approach.&lt;/p&gt;
&lt;p&gt;I was going to suggest breaking down the first path (Split would do nicely), and then compare using something like:&lt;/p&gt;
&lt;p&gt;If Path2 Like Path1 &amp; &quot;*&quot;&lt;/p&gt;
&lt;p&gt;rebuilding the Path1 from its components until the match either breaks or is complete.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I like Andy&#8217;s approach.</p>
<p>I was going to suggest breaking down the first path (Split would do nicely), and then compare using something like:</p>
<p>If Path2 Like Path1 &amp; &#8220;*&#8221;</p>
<p>rebuilding the Path1 from its components until the match either breaks or is complete.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

