No it compares column A to my vCriteria then adds the value in column B if there is a match.
It doesn't really seem necessary to add a sample workbook I'm just having trouble adding column C as well (if there is a match).
I have changed it to the following- but this produces an error:
Set oDic = CreateObject("Scripting.Dictionary")
With Sheets("ExP")
vData = .Range("A2:C" & .Cells(.Rows.Count, "A").End(xlUp).Row).Value
End With
For i = 1 To UBound(vData, 1)
If vData(i, 1) = vCriteria2 Then
If Not oDic.Exists(CStr(vData(i, 2))) Then oDic.Add CStr(vData(i, 2)), vData(i, 2) And oDic.Add CStr(vData(i, 3)), vData(i, 3)
End If
Bookmarks