I have a list of entries that contain many instances of both numeric and text value that I am trying to restrict to text only (I dont need and items beginning with a number). This code gives me an output in column H of unique entries.
How can I use an If statement to filter only the entries starting with a letter??
Private Sub SubContractors()
Dim rng As Range
With Sheets("Sheet1")
Lrow = .Range("a" & Rows.Count).End(xlUp).Row
Set rng = .Range("a2:a" & Lrow)
vaData = rng
Set colUnique = New Collection
For i = LBound(vaData, 1) To UBound(vaData, 1)
On Error Resume Next
colUnique.Add vaData(i, 1), CStr(vaData(i, 1))
On Error GoTo 0
Next i
ReDim aOutput(1 To colUnique.Count, 1 To 1)
For i = 1 To colUnique.Count
aOutput(i, 1) = colUnique.Item(i)
Next i
.Range("h2").Resize(UBound(aOutput, 1), UBound(aOutput, 2)).Value = aOutput
End With
End Sub
Bookmarks