<?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: Combining Arrays</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Maurik van den Heuvel</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-43136</link>
		<dc:creator>Maurik van den Heuvel</dc:creator>
		<pubDate>Sat, 02 Jan 2010 22:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-43136</guid>
		<description>&lt;p&gt;Hi, I went throught Juan Pablo&#039;s code. I had not worked with arrays very often yet, and I like the simplicity of this code. I was wondering, if you&#039;d want to not add the 2nd vector below the first vector, but as a new column, how would you code that?&lt;/p&gt;
&lt;p&gt;Really curious to know!&lt;/p&gt;
&lt;p&gt;Thanks, Maurik&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, I went throught Juan Pablo&#8217;s code. I had not worked with arrays very often yet, and I like the simplicity of this code. I was wondering, if you&#8217;d want to not add the 2nd vector below the first vector, but as a new column, how would you code that?</p>
<p>Really curious to know!</p>
<p>Thanks, Maurik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Williams</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-34965</link>
		<dc:creator>Charles Williams</dc:creator>
		<pubDate>Mon, 06 Oct 2008 18:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-34965</guid>
		<description>&lt;p&gt;Hans,&lt;/p&gt;
&lt;p&gt;Having tested it I think the result of your one-liner is always a variant containing strings, which could be unfortunate if you were feeding it numbers.&lt;/p&gt;
&lt;p&gt;I agree that most of the time the speed difference does not matter, but for larger data volumes the speed difference could be significant.&lt;br&gt;
If you built a UDF that combined 2 10000 element arrays and had 1000 instances of the udf the time difference on my fast machine would be about 20 seconds.&lt;/p&gt;
&lt;p&gt;regards&lt;br&gt;
Charles&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hans,</p>
<p>Having tested it I think the result of your one-liner is always a variant containing strings, which could be unfortunate if you were feeding it numbers.</p>
<p>I agree that most of the time the speed difference does not matter, but for larger data volumes the speed difference could be significant.<br />
If you built a UDF that combined 2 10000 element arrays and had 1000 instances of the udf the time difference on my fast machine would be about 20 seconds.</p>
<p>regards<br />
Charles</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Schraven</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-34963</link>
		<dc:creator>Hans Schraven</dc:creator>
		<pubDate>Sun, 05 Oct 2008 22:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-34963</guid>
		<description>&lt;p&gt;Although &#039;join&#039; converts to a string, split results in an array (Variant). So there&#039;s no use in declaring strings.&lt;br&gt;
I combined 2 arrays consisting of 100 elements to an array of 200 elements.&lt;br&gt;
My one-liner took 1,3 msec, the &#039;loop&#039; did it in ,3 msec.( test performed on a very slow computer PII, 350 MHz)&lt;br&gt;
Although the difference in speed amounts to a factor 4, no user will notice the difference.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Although &#8216;join&#8217; converts to a string, split results in an array (Variant). So there&#8217;s no use in declaring strings.<br />
I combined 2 arrays consisting of 100 elements to an array of 200 elements.<br />
My one-liner took 1,3 msec, the &#8216;loop&#8217; did it in ,3 msec.( test performed on a very slow computer PII, 350 MHz)<br />
Although the difference in speed amounts to a factor 4, no user will notice the difference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Williams</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-34962</link>
		<dc:creator>Charles Williams</dc:creator>
		<pubDate>Sun, 05 Oct 2008 19:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-34962</guid>
		<description>&lt;p&gt;Hans,&lt;/p&gt;
&lt;p&gt;I think your code always converts to strings?&lt;/p&gt;
&lt;p&gt;And since string handling, particularly declaring strings, is usually very inefficient in VBA I would guess using Split and Join is slow. Have you done any tests?&lt;/p&gt;
&lt;p&gt;regards&lt;br&gt;
Charles&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hans,</p>
<p>I think your code always converts to strings?</p>
<p>And since string handling, particularly declaring strings, is usually very inefficient in VBA I would guess using Split and Join is slow. Have you done any tests?</p>
<p>regards<br />
Charles</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Schraven</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-34958</link>
		<dc:creator>Hans Schraven</dc:creator>
		<pubDate>Sat, 04 Oct 2008 15:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-34958</guid>
		<description>&lt;p&gt;I&#039;d prefer&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;arrayunion=split(join(va1,&lt;span class=&quot;st0&quot;&gt;&quot;&#124;&quot;&lt;/span&gt;) &amp; &lt;span class=&quot;st0&quot;&gt;&quot;&#124;&quot;&lt;/span&gt; &amp; join(va2,&lt;span class=&quot;st0&quot;&gt;&quot;&#124;&quot;&lt;/span&gt;),&lt;span class=&quot;st0&quot;&gt;&quot;&#124;&quot;&lt;/span&gt;)&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;d prefer</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer">arrayunion=split(join(va1,<span class="st0">&#8220;|&#8221;</span>) &amp;amp; <span class="st0">&#8220;|&#8221;</span> &amp;amp; join(va2,<span class="st0">&#8220;|&#8221;</span>),<span class="st0">&#8220;|&#8221;</span>)</div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Chien</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-34943</link>
		<dc:creator>Andrew Chien</dc:creator>
		<pubDate>Fri, 03 Oct 2008 04:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-34943</guid>
		<description>&lt;p&gt;Two comments:&lt;br&gt;
(1) the checking of Empty array does not work,&lt;br&gt;
    TypeName() of an NOT allocated dynamic array of integer will return &quot;Integer()&quot;&lt;/p&gt;
&lt;p&gt;2) the for-loop to copy the second array: the LBound of second array is not always one, suggest to change to&lt;br&gt;
   va1(Upper + (i-LBound(va2)+1) = va2(i)&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Two comments:<br />
(1) the checking of Empty array does not work,<br />
    TypeName() of an NOT allocated dynamic array of integer will return &#8220;Integer()&#8221;</p>
<p>2) the for-loop to copy the second array: the LBound of second array is not always one, suggest to change to<br />
   va1(Upper + (i-LBound(va2)+1) = va2(i)</p>
<p>regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colo</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-2075</link>
		<dc:creator>Colo</dc:creator>
		<pubDate>Fri, 06 Aug 2004 03:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-2075</guid>
		<description>&lt;p&gt;I&#039;ve added a similar UDF in my tips site.&lt;br&gt;
Thanks for giving me an idea!&lt;br&gt;
&lt;a&gt;http://puremis.net/excel/code/076.shtml&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve added a similar UDF in my tips site.<br />
Thanks for giving me an idea!<br />
<a>http://puremis.net/excel/code/076.shtml</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colo</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-2074</link>
		<dc:creator>Colo</dc:creator>
		<pubDate>Thu, 05 Aug 2004 08:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-2074</guid>
		<description>&lt;p&gt;Hi Jamie,&lt;/p&gt;
&lt;p&gt;I&#039;m afaraid the arguments must be an array. Please give this a try.&lt;/p&gt;
&lt;p&gt;Sub TestingFunction()&lt;br&gt;
    Dim ele&lt;br&gt;
    a = Array(1, 2, 3)&lt;br&gt;
    b = Array(4, 5, 6)&lt;br&gt;
    c = ArrayUnion(a, b)&lt;br&gt;
    For Each elm In c&lt;br&gt;
        Debug.Print elm&lt;br&gt;
    Next&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;Hi Dick, I placed a link to here on my tip site, see&lt;br&gt;
&lt;a href=&quot;http://puremis.net/excel/code/075.shtml&quot; rel=&quot;nofollow&quot;&gt;http://puremis.net/excel/code/075.shtml&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Jamie,</p>
<p>I&#8217;m afaraid the arguments must be an array. Please give this a try.</p>
<p>Sub TestingFunction()<br />
    Dim ele<br />
    a = Array(1, 2, 3)<br />
    b = Array(4, 5, 6)<br />
    c = ArrayUnion(a, b)<br />
    For Each elm In c<br />
        Debug.Print elm<br />
    Next<br />
End Sub</p>
<p>Hi Dick, I placed a link to here on my tip site, see<br />
<a href="http://puremis.net/excel/code/075.shtml" rel="nofollow">http://puremis.net/excel/code/075.shtml</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-2073</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Mon, 02 Aug 2004 18:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-2073</guid>
		<description>&lt;p&gt;I&#039;ve tested this in the Immediate Window, here are the results:&lt;/p&gt;
&lt;p&gt;a = Array(Sheet1)&lt;br&gt;
b = Array(ThisWorkbook)&lt;br&gt;
c = ArrayUnion(a,b)&lt;br&gt;
? err.Description&lt;br&gt;
Object doesn&#039;t support this property or method&lt;/p&gt;
&lt;p&gt;Jamie.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tested this in the Immediate Window, here are the results:</p>
<p>a = Array(Sheet1)<br />
b = Array(ThisWorkbook)<br />
c = ArrayUnion(a,b)<br />
? err.Description<br />
Object doesn&#8217;t support this property or method</p>
<p>Jamie.</p>
<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/08/02/combining-arrays/#comment-2072</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Mon, 02 Aug 2004 17:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=702#comment-2072</guid>
		<description>&lt;p&gt;Stephen:  I&#039;ve tried that same thing when I wanted a generic array sorting routine that would handle any number of dimensions.  After a while, I decided that it was easier to have two routines; one for single dimension arrays and one for double dimension arrays.  I have yet to use a three dimension array.  It might be worth another look, though.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Stephen:  I&#8217;ve tried that same thing when I wanted a generic array sorting routine that would handle any number of dimensions.  After a while, I decided that it was easier to have two routines; one for single dimension arrays and one for double dimension arrays.  I have yet to use a three dimension array.  It might be worth another look, though.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

