Hello,
I am looking for some assistance in using a Scripting Dictionary to read a column of data and store unique values for output into a list. The problem i am coming across is the Scripting Dictionary is parsing lines in separately when it sees a comma.
For example:
AL - Medical Group, LLC [6239]
CA - Medical Group, LLC [4378]
WA - Medical Group [6792]
Produces an output of:
AL - Medical Group
LLC [6239]
CA - Medical Group
LLC [4378]
WA - Medical Group [6792]
I am looking for the output to not be separated when the Scripting Dictionary sees a comma.
Any help appreciated.
Justin
I am looking for some assistance in using a Scripting Dictionary to read a column of data and store unique values for output into a list. The problem i am coming across is the Scripting Dictionary is parsing lines in separately when it sees a comma.
For example:
AL - Medical Group, LLC [6239]
CA - Medical Group, LLC [4378]
WA - Medical Group [6792]
Produces an output of:
AL - Medical Group
LLC [6239]
CA - Medical Group
LLC [4378]
WA - Medical Group [6792]
I am looking for the output to not be separated when the Scripting Dictionary sees a comma.
Any help appreciated.
Justin
Code:
'Load dictionary with Practice Name values
j = 1
On Error Resume Next
For i = 2 To dataSheetLastRow
If Len(dataSheet.Cells(i, "A")) <> 0 Then
dictionary.Add dataSheet.Cells(i, "A"), j
j = j + 1
End If
Next
'Populate List
With dashboardMetricsSheet.Range("B3")
With .Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=Join(dictionary.Keys(), ",")
End With
End With