So, I used the left function to take the first 4 characters of a string and I need to run a vlookup with it, but it won't find the match because it's looking through numbers.
I want to do this in a macro, so I'm not sure about the syntax. Can someone help?
use the val() function
If, for example, x = 5 and is stored as string, you can also just:
x = x + 0
and the new x would be stored as a numeric value.
Source: Stackoverflow.com