<?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: Create a unique distinct list of a long list without sacrificing performance using vba in excel</title> <atom:link href="http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/feed/" rel="self" type="application/rss+xml" /><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/</link> <description>Quality excel resource</description> <lastBuildDate>Sat, 11 Feb 2012 15:14:13 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Oscar</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-8632</link> <dc:creator>Oscar</dc:creator> <pubDate>Sun, 31 Oct 2010 07:57:58 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-8632</guid> <description>Thanks Eero for your contribution!!</description> <content:encoded><![CDATA[<p>Thanks Eero for your contribution!!</p> ]]></content:encoded> </item> <item><title>By: Eero</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-8600</link> <dc:creator>Eero</dc:creator> <pubDate>Sat, 30 Oct 2010 12:05:52 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-8600</guid> <description>It seems some characters may be lost in the macro code after posting.
If running macros fails then you can send me a request and i will send a file by email:(eerotibar@gmail.com)</description> <content:encoded><![CDATA[<p>It seems some characters may be lost in the macro code after posting.</p><p>If running macros fails then you can send me a request and i will send a file by email:(eerotibar@gmail.com)</p> ]]></content:encoded> </item> <item><title>By: Eero</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-8599</link> <dc:creator>Eero</dc:creator> <pubDate>Sat, 30 Oct 2010 11:54:22 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-8599</guid> <description>Hi, Oscar!
&quot;Maybe someone else have some lightning fast formula technique?&quot;
You can try and explore the following, something different approach:
I tried this on my laptop with Excel 2007:
The following macro fills the column A with 1048574 random numbers between 1 and 1048574
Public Sub fillrandomnumbers()
Dim m As Long
m = 1048574
With Range(&quot;a1:a&quot; &amp; m)
.Formula = &quot;=RandBetween(1,1048574)&quot;
.Value = .Value
End With
End Sub
Now, it is needed to sort the list in ascending order!
Then, to get a unique list of numbers into column B run the following macro:
Sub uniquelist()
Dim s As Long
Dim v As Variant
Dim z As Long
s = 1048574
v = [a1]
Columns(&quot;A&quot;).Insert
With Range(&quot;a1:a&quot; &amp; s)
.Formula = &quot;=if(b1&lt;&gt;b2,b2)&quot;
.Value = .Value
.Sort Range(&quot;a1&quot;), xlAscending
z = .SpecialCells(2, 3).Count
Range(&quot;c1:c&quot; &amp; z) = .Value
End With
Columns(&quot;A&quot;).Delete
[b1] = v
End Sub
It takes about 20-25 second to complete this huge task on my laptop.
Remarks:
The last macro works with strings as well. The sorting procedure can also be inside the macro. And there must be at least one free cell below the initial list.</description> <content:encoded><![CDATA[<p>Hi, Oscar!</p><p>"Maybe someone else have some lightning fast formula technique?"</p><p>You can try and explore the following, something different approach:</p><p>I tried this on my laptop with Excel 2007:</p><p>The following macro fills the column A with 1048574 random numbers between 1 and 1048574</p><p>Public Sub fillrandomnumbers()<br
/> Dim m As Long<br
/> m = 1048574<br
/> With Range("a1:a" &amp; m)<br
/> .Formula = "=RandBetween(1,1048574)"<br
/> .Value = .Value<br
/> End With<br
/> End Sub</p><p>Now, it is needed to sort the list in ascending order!</p><p>Then, to get a unique list of numbers into column B run the following macro:</p><p>Sub uniquelist()<br
/> Dim s As Long<br
/> Dim v As Variant<br
/> Dim z As Long<br
/> s = 1048574<br
/> v = [a1]<br
/> Columns("A").Insert<br
/> With Range("a1:a" &amp; s)<br
/> .Formula = "=if(b1<>b2,b2)"<br
/> .Value = .Value<br
/> .Sort Range("a1"), xlAscending<br
/> z = .SpecialCells(2, 3).Count<br
/> Range("c1:c" &amp; z) = .Value<br
/> End With<br
/> Columns("A").Delete<br
/> [b1] = v<br
/> End Sub</p><p>It takes about 20-25 second to complete this huge task on my laptop.</p><p>Remarks:</p><p>The last macro works with strings as well. The sorting procedure can also be inside the macro. And there must be at least one free cell below the initial list.</p> ]]></content:encoded> </item> <item><title>By: Oscar</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-3908</link> <dc:creator>Oscar</dc:creator> <pubDate>Sat, 17 Jul 2010 22:08:26 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-3908</guid> <description>joško,
See this post: http://www.get-digital-help.com/2010/07/17/create-dependent-drop-down-lists-containing-unique-distinct-values-in-excel/</description> <content:encoded><![CDATA[<p>joško,</p><p>See this post: <a
href="http://www.get-digital-help.com/2010/07/17/create-dependent-drop-down-lists-containing-unique-distinct-values-in-excel/" rel="nofollow">http://www.get-digital-help.com/2010/07/17/create-dependent-drop-down-lists-containing-unique-distinct-values-in-excel/</a></p> ]]></content:encoded> </item> <item><title>By: joško</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-3649</link> <dc:creator>joško</dc:creator> <pubDate>Fri, 02 Jul 2010 19:46:55 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-3649</guid> <description>What would the code look like if I have two collumns?
In first one are names of people and they can occur many times.
In the second one there are different cities. So for each name one or more different cities can occur in second column.
The upper code does well when listing unique names. What if in certain cell I select from dropdown list one of these names and excel has to create secondary unique list (based on only one choosen name from column one). Any suggestions? Would mean a lot!!!</description> <content:encoded><![CDATA[<p>What would the code look like if I have two collumns?</p><p>In first one are names of people and they can occur many times.<br
/> In the second one there are different cities. So for each name one or more different cities can occur in second column.</p><p>The upper code does well when listing unique names. What if in certain cell I select from dropdown list one of these names and excel has to create secondary unique list (based on only one choosen name from column one). Any suggestions? Would mean a lot!!!</p> ]]></content:encoded> </item> <item><title>By: Oscar</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-2638</link> <dc:creator>Oscar</dc:creator> <pubDate>Fri, 19 Feb 2010 08:34:19 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-2638</guid> <description>david,
Advanced Filter uses your first value as a column header.
/Oscar</description> <content:encoded><![CDATA[<p>david,</p><p>Advanced Filter uses your first value as a column header.</p><p>/Oscar</p> ]]></content:encoded> </item> <item><title>By: david</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-2633</link> <dc:creator>david</dc:creator> <pubDate>Fri, 19 Feb 2010 02:04:34 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-2633</guid> <description>thx oscar, the &quot;no-flipping&quot; function works.
btw, do u know that the Adv Filter-unique value doesnt work if the first 2 values are the same?
e.g.
10001
10001
10001
10002
10002
10003
10004
10004
10005
generated list from Adv Filter are...
10001 &lt;-repeat
10001 &lt;-repeat
10002
10003
10004
10005</description> <content:encoded><![CDATA[<p>thx oscar, the "no-flipping" function works.</p><p>btw, do u know that the Adv Filter-unique value doesnt work if the first 2 values are the same?</p><p>e.g.</p><p>10001<br
/> 10001<br
/> 10001<br
/> 10002<br
/> 10002<br
/> 10003<br
/> 10004<br
/> 10004<br
/> 10005</p><p>generated list from Adv Filter are...</p><p>10001 &lt;-repeat<br
/> 10001 &lt;-repeat<br
/> 10002<br
/> 10003<br
/> 10004<br
/> 10005</p> ]]></content:encoded> </item> <item><title>By: Oscar</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-2620</link> <dc:creator>Oscar</dc:creator> <pubDate>Wed, 17 Feb 2010 21:22:36 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-2620</guid> <description>David,
To remove &quot;flipping&quot; use:  Application.ScreenUpdating = False
/Oscar</description> <content:encoded><![CDATA[<p>David,</p><p>To remove "flipping" use:  Application.ScreenUpdating = False</p><p>/Oscar</p> ]]></content:encoded> </item> <item><title>By: david</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-2564</link> <dc:creator>david</dc:creator> <pubDate>Thu, 11 Feb 2010 23:33:54 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-2564</guid> <description>thx oscar. it works, but only after i added this:
Sub AdvFilter()
&#039;
&#039; AdvFilter Macro
Sheets(&quot;VC&quot;).Select
Range(&quot;VC!A2&quot;).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
&quot;Calc!C2&quot;), Unique:=True
Sheets(&quot;Chart&quot;).Select
End Sub
-----------
problem with Adv Filter is that it cant just pull data from another sheet. The sheet must be active before Adv Filter can be executed.
my rough tweak is to Select the VC sheet first, then let the Adv Filter routine run (generated on Calc sheet). Then change back to Chart sheet where the button is.
this creates a short sheet &quot;flipping&quot; when the button is created.</description> <content:encoded><![CDATA[<p>thx oscar. it works, but only after i added this:</p><p>Sub AdvFilter()<br
/> '<br
/> ' AdvFilter Macro<br
/> Sheets("VC").Select<br
/> Range("VC!A2").Select</p><p>Range(Selection, Selection.End(xlDown)).Select</p><p>Selection.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _<br
/> "Calc!C2"), Unique:=True</p><p>Sheets("Chart").Select</p><p>End Sub</p><p>-----------</p><p>problem with Adv Filter is that it cant just pull data from another sheet. The sheet must be active before Adv Filter can be executed.</p><p>my rough tweak is to Select the VC sheet first, then let the Adv Filter routine run (generated on Calc sheet). Then change back to Chart sheet where the button is.</p><p>this creates a short sheet "flipping" when the button is created.</p> ]]></content:encoded> </item> <item><title>By: Oscar</title><link>http://www.get-digital-help.com/2010/02/10/create-a-unique-distinct-list-of-a-long-list-without-sacrificing-performance-using-vba-in-excel/comment-page-1/#comment-2561</link> <dc:creator>Oscar</dc:creator> <pubDate>Thu, 11 Feb 2010 21:05:21 +0000</pubDate> <guid
isPermaLink="false">http://www.get-digital-help.com/?p=3669#comment-2561</guid> <description>David, try this:
Sub AdvFilter()
&#039;
&#039; AdvFilter Macro
Range(&quot;VC!A2&quot;).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
&quot;Calc!C2&quot;), Unique:=True
End Sub</description> <content:encoded><![CDATA[<p>David, try this:</p><p>Sub AdvFilter()<br
/> '<br
/> ' AdvFilter Macro</p><p>Range("VC!A2").Select</p><p>Range(Selection, Selection.End(xlDown)).Select</p><p>Selection.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _<br
/> "Calc!C2"), Unique:=True</p><p>End Sub</p> ]]></content:encoded> </item> </channel> </rss>
