kylefoley76
Well-known Member
- Joined
- Mar 1, 2010
- Messages
- 1,553
The following code is not working:
I know the problem has to be because the subj is a number but I'm trying to treat it as a string. I've reformatted the cells as both text and general but that still does not work. The macro works on every other object in the d column except for those objects which are numbers. I have even tried the following code
If isnumeral(subj) Then
subj = CStr(subj)
End If
But that doesn't work either. The error message I'm getting is 1004.
Code:
If Application.WorksheetFunction.VLookup(subj, sheet.Range("d1:f1048576"), 3, 0) = "indefinable" Then
I know the problem has to be because the subj is a number but I'm trying to treat it as a string. I've reformatted the cells as both text and general but that still does not work. The macro works on every other object in the d column except for those objects which are numbers. I have even tried the following code
If isnumeral(subj) Then
subj = CStr(subj)
End If
But that doesn't work either. The error message I'm getting is 1004.