Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
countif function: how to distinguish case/make case sensitive | Excel Worksheet Functions | |||
Case Sensitive LookUps | Excel Worksheet Functions | |||
Case Sensitive w/ IF | Excel Worksheet Functions | |||
.Name case sensitive | Excel Programming | |||
Collection of case sensitive unique items | Excel Programming |