criscocube
New Member
- Joined
- Jan 4, 2017
- Messages
- 19
It seems that VBA in Excel does not really allow for the use of wildcards the same way as formulas...?
This results in nothing... if I remove the "*" & etc it works fine and gets results quickly....
why does wildcard not work, how can i fix this?
thanks
Code:
Sub mehstuff()
For c = 1 To 20000
If Sheets("Combined Samples").Cells(c, 4) = "*" & Worksheets("Temp").Cells(1, 1) & "*" Then
Worksheets("Combined Samples").Cells(c, 5).Copy _
Destination:=Worksheets("Temp").Cells(c, 2)
End If
Next c
End Sub
This results in nothing... if I remove the "*" & etc it works fine and gets results quickly....
why does wildcard not work, how can i fix this?
thanks