I created a table to include/exclude distinct values from a larger dataset. This table is made with a scripting dictionary.
The dataset could contain numeric values as a parameter which should be considered as a textual value.
Example: "05" and "5" should be considered as two distinct values.
The scripting dictionary saves the two values as two distinct values but when I use the Application.Transpose code for the keys the keys are considered as one value ("5").
Is there a way to paste the keys as two distinct values?
I've tried to add a single quote ('
) in front of the relevant data but this didn't appear in the keys.
If Not aCell Is Nothing Then
Dim d As Object, c As Variant, j As Long, lr As Long
Set d = CreateObject("Scripting.Dictionary")
Worksheets("DATASET").Activate
lr = Cells(Rows.Count, aCell.Column).End(xlUp).Row
c = Range(Cells(1, aCell.Column).Address(), Cells(lr, aCell.Column).Address())
For j = 1 To UBound(c, 1)
d(c(j, 1)) = 1
Next j
Targetrange.Resize(d.Count) = Application.Transpose(d.keys)
End If