LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Case sensitive unique list

Hello,

On another post to this group I found the following code, which creates
a case-sensitive unique list of items:

'Requires project reference to the "Microsoft Scripting Runtime"
Sub Test()
Dim x As Scripting.Dictionary
Dim Rng As Range
Dim iVal As Range


Set x = New Scripting.Dictionary
Set Rng = Range("A1:A5")


On Error Resume Next
For Each iVal In Rng
x.Add key:=iVal.Text, Item:=iVal
Next
On Error GoTo 0
Range(Cells(1, 2), Cells(1, x.Count + 1)).Value = x.Keys


Set Rng = Nothing
Set iVal = Nothing
Set x = Nothing
End Sub

My question is, does anyone know how to output this list vertically
instead of horizontally? I know that I can transpose it afterward but
that is not ideal. I tried outputting to a vertical range of equal
number of cells but was left with the first entry in the list repeated
in all of the cells.

Any ideas???

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif function: how to distinguish case/make case sensitive mvwoolner Excel Worksheet Functions 3 March 18th 09 02:18 PM
Case Sensitive LookUps carl Excel Worksheet Functions 1 April 3rd 08 04:03 PM
Case Sensitive w/ IF jeffP Excel Worksheet Functions 11 February 6th 06 01:16 AM
.Name case sensitive CinqueTerra Excel Programming 2 January 16th 06 08:57 PM
Collection of case sensitive unique items Alan Beban[_2_] Excel Programming 4 October 28th 04 08:20 PM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"