<?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: Populate a MultiColumn ListBox From an Unsorted Range</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/</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: Hoo Lien Wee</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-43370</link>
		<dc:creator>Hoo Lien Wee</dc:creator>
		<pubDate>Fri, 15 Jan 2010 06:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-43370</guid>
		<description>&lt;p&gt;Instead of add &amp; delete temporary worksheet, I&#039;ve used the code found from the book &quot;Numerical Recipes in C#&quot;. Just create a ComboBox to select which column in the ListBox to be set as first key sort order.&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;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; CommandButton1_Click()&lt;br&gt;
Application.ScreenUpdating = &lt;span class=&quot;kw1&quot;&gt;False&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;ReDim&lt;/span&gt; SortedList(TotalRow, 4)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; k = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; TotalRow&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 4&lt;br&gt;
&#160; &#160; SortedList(k, i) = ListBox1.List(k, i)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; k&lt;br&gt;
&lt;br&gt;
SortByColumn = ComboBox1.ListIndex&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Call&lt;/span&gt; SimpleSort(TotalRow, SortedList, SortByColumn)&lt;br&gt;
&lt;br&gt;
Application.ScreenUpdating = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; SimpleSort(TotalRow, SortedList, SortByColumn)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; tmp(5)&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; k = 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; TotalRow&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 4&lt;br&gt;
&#160; &#160; tmp(i) = SortedList(k, i)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; j = k - 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 0 &lt;span class=&quot;kw1&quot;&gt;Step&lt;/span&gt; -1&lt;br&gt;
&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 4&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; SortByColumn = i &lt;span class=&quot;kw1&quot;&gt;And&lt;/span&gt; SortedList(j, i) &lt; tmp(i) &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;GoTo&lt;/span&gt; Line2&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 4&lt;br&gt;
&#160; &#160; &#160; &#160; SortedList(j + 1, i) = SortedList(j, i)&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; j&lt;br&gt;
&#160; &#160; j = -1&lt;br&gt;
&lt;br&gt;
&#160; &#160; Line2:&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = 0 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; 4&lt;br&gt;
&#160; &#160; SortedList(j + 1, i) = tmp(i)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; k&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;There are other quick sorting methods where you can find in the book.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Instead of add &amp; delete temporary worksheet, I&#8217;ve used the code found from the book &#8220;Numerical Recipes in C#&#8221;. Just create a ComboBox to select which column in the ListBox to be set as first key sort order.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Private</span> <span class="kw1">Sub</span> CommandButton1_Click()<br />
Application.ScreenUpdating = <span class="kw1">False</span></p>
<p><span class="kw1">ReDim</span> SortedList(TotalRow, 4)<br />
<span class="kw1">For</span> k = 0 <span class="kw1">To</span> TotalRow<br />
&nbsp; &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 4<br />
&nbsp; &nbsp; SortedList(k, i) = ListBox1.List(k, i)<br />
&nbsp; &nbsp; <span class="kw1">Next</span> i<br />
<span class="kw1">Next</span> k</p>
<p>SortByColumn = ComboBox1.ListIndex<br />
<span class="kw1">Call</span> SimpleSort(TotalRow, SortedList, SortByColumn)</p>
<p>Application.ScreenUpdating = <span class="kw1">True</span><br />
<span class="kw1">End</span> <span class="kw1">Sub</span></p>
<p><span class="kw1">Sub</span> SimpleSort(TotalRow, SortedList, SortByColumn)<br />
<span class="kw1">Dim</span> tmp(5)</p>
<p><span class="kw1">For</span> k = 1 <span class="kw1">To</span> TotalRow</p>
<p>&nbsp; &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 4<br />
&nbsp; &nbsp; tmp(i) = SortedList(k, i)<br />
&nbsp; &nbsp; <span class="kw1">Next</span> i</p>
<p><span class="kw1">For</span> j = k &#8211; 1 <span class="kw1">To</span> 0 <span class="kw1">Step</span> -1</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 4<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> SortByColumn = i <span class="kw1">And</span> SortedList(j, i) &amp;lt; tmp(i) <span class="kw1">Then</span> <span class="kw1">GoTo</span> Line2<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Next</span> i</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 4<br />
&nbsp; &nbsp; &nbsp; &nbsp; SortedList(j + 1, i) = SortedList(j, i)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Next</span> i</p>
<p>&nbsp; &nbsp; <span class="kw1">Next</span> j<br />
&nbsp; &nbsp; j = -1</p>
<p>&nbsp; &nbsp; Line2:<br />
&nbsp; &nbsp; <span class="kw1">For</span> i = 0 <span class="kw1">To</span> 4<br />
&nbsp; &nbsp; SortedList(j + 1, i) = tmp(i)<br />
&nbsp; &nbsp; <span class="kw1">Next</span> i</p>
<p><span class="kw1">Next</span> k</p>
<p><span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
<p>There are other quick sorting methods where you can find in the book.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geb Blum</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-31711</link>
		<dc:creator>Geb Blum</dc:creator>
		<pubDate>Sat, 05 Apr 2008 22:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-31711</guid>
		<description>&lt;p&gt;Thank you so much. This article has been a great help!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you so much. This article has been a great help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hui</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-22628</link>
		<dc:creator>hui</dc:creator>
		<pubDate>Fri, 02 Mar 2007 09:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-22628</guid>
		<description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;I tried the code. But this portion is not working:&lt;/p&gt;
&lt;p&gt;With Sheet1.QueryTables(1).ResultRange&lt;br&gt;
        Set rCopy = .Offset(1).Resize(.Rows.Count - 1)&lt;br&gt;
End With&lt;/p&gt;
&lt;p&gt;Could anyone help?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi ,</p>
<p>I tried the code. But this portion is not working:</p>
<p>With Sheet1.QueryTables(1).ResultRange<br />
        Set rCopy = .Offset(1).Resize(.Rows.Count &#8211; 1)<br />
End With</p>
<p>Could anyone help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-22132</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Fri, 19 Jan 2007 01:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-22132</guid>
		<description>&lt;p&gt;Hi,&lt;br&gt;
i am software engg working in tokyo,japan.&lt;br&gt;
in my project i have to sort the list coloumn if its corresponding header is clicked.&lt;br&gt;
i need its solution as soon as possible,it is very very urgently required.&lt;br&gt;
please help me with the solution.&lt;/p&gt;
&lt;p&gt;rgds&lt;br&gt;
pradeep&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,<br />
i am software engg working in tokyo,japan.<br />
in my project i have to sort the list coloumn if its corresponding header is clicked.<br />
i need its solution as soon as possible,it is very very urgently required.<br />
please help me with the solution.</p>
<p>rgds<br />
pradeep</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antoine Dubuc</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-21782</link>
		<dc:creator>Antoine Dubuc</dc:creator>
		<pubDate>Sat, 09 Dec 2006 05:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-21782</guid>
		<description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Thank you for this website. It is full of good ideas. Publish a book! (or did you?)&lt;/p&gt;
&lt;p&gt;I have a question...&lt;/p&gt;
&lt;p&gt;If the data is just a worksheet, then what changes in this code?&lt;/p&gt;
&lt;p&gt;Also, whats the difference between a worksheet and a sheet!!!!!????&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Antoine Dubuc&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>Thank you for this website. It is full of good ideas. Publish a book! (or did you?)</p>
<p>I have a question&#8230;</p>
<p>If the data is just a worksheet, then what changes in this code?</p>
<p>Also, whats the difference between a worksheet and a sheet!!!!!????</p>
<p>Best regards,</p>
<p>Antoine Dubuc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PaCoCourt</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-21648</link>
		<dc:creator>PaCoCourt</dc:creator>
		<pubDate>Wed, 29 Nov 2006 15:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-21648</guid>
		<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It&#039;s verry fast to sort with your code.&lt;br&gt;
In the listbox, i&#039;d like to modify an element (a colomn from a row)Or&lt;br&gt;
the most interesting, is to paste directly data in a raw.&lt;/p&gt;
&lt;p&gt;It&#039;s verry kind if you could help me.&lt;/p&gt;
&lt;p&gt;bye&lt;br&gt;
P.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>It&#8217;s verry fast to sort with your code.<br />
In the listbox, i&#8217;d like to modify an element (a colomn from a row)Or<br />
the most interesting, is to paste directly data in a raw.</p>
<p>It&#8217;s verry kind if you could help me.</p>
<p>bye<br />
P.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-17508</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 17 Nov 2005 12:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-17508</guid>
		<description>&lt;p&gt;I actually do this with a row of labels. I give the labels the button type appearance and put the sort into their on-click event. The label buttons make less obtrusive headers than command buttons.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I actually do this with a row of labels. I give the labels the button type appearance and put the sort into their on-click event. The label buttons make less obtrusive headers than command buttons.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-17507</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 16 Nov 2005 23:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-17507</guid>
		<description>&lt;p&gt;Betsy,&lt;/p&gt;
&lt;p&gt;I would add a row of CommandButtons just above the listbox that would look like headers (headers are a good idea anyway).  They could pass the column to sort on as a parameter to Dick&#039;s code. You could even toggle ascending and descending sorts with successive clicks.&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Betsy,</p>
<p>I would add a row of CommandButtons just above the listbox that would look like headers (headers are a good idea anyway).  They could pass the column to sort on as a parameter to Dick&#8217;s code. You could even toggle ascending and descending sorts with successive clicks.</p>
<p>Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-13101</link>
		<dc:creator>tony</dc:creator>
		<pubDate>Thu, 02 Jun 2005 15:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-13101</guid>
		<description>&lt;p&gt;I am use less&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am use less</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Marx</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/04/populate-a-multicolumn-listbox-from-an-unsorted-range/#comment-5366</link>
		<dc:creator>Jake Marx</dc:creator>
		<pubDate>Mon, 17 Jan 2005 22:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=601#comment-5366</guid>
		<description>&lt;p&gt;Betsy,&lt;/p&gt;
&lt;p&gt;When you have to deal with different alignments per column or other column-related activities, you should look at the ListView control.  I&#039;m not sure if it&#039;s included in Windows or if it comes with Visual Studio (or VB).  But if you have it on your machine, you may want to take a look at it.&lt;/p&gt;
&lt;p&gt;I have a sample workbook if you&#039;d like me to email it to you.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Betsy,</p>
<p>When you have to deal with different alignments per column or other column-related activities, you should look at the ListView control.  I&#8217;m not sure if it&#8217;s included in Windows or if it comes with Visual Studio (or VB).  But if you have it on your machine, you may want to take a look at it.</p>
<p>I have a sample workbook if you&#8217;d like me to email it to you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

