![]() |
AdvancedFilter to Array
Hello,
I would like to optimase my code. Now I have this: ' Dim rng1 As Range, c1 As Byte, c2 As Byte Worksheets("sheet1").Select Set rng1 = Range(Cells(1, 2), Cells(1, 2).End(xlDown)) rng1.AdvancedFilter xlFilterCopy, , Cells(1, 11), True c1 = Cells(1, 1).CurrentRegion.Rows.Count ReDim tblUniqueData(c1) For c2 = 1 To c1 tblUniqueData(c2) = Cells(c2 + 1, 11) Next councik2 Cells(1, 11).CurrentRegion.Clear Is any way to made so? Dim varArray() as String varArray = _ rng1.AdvancedFilter xlFilterCopy, , Cells(1, 11), True It's possible? and next quastion:) 1) How to sort varArray without "Loop" or "For", I heard that it's possible when dimmension is in Selection 2) How to get Unique Value (not only one field) from varArray? Best Reg. Witek *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 09:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com