This is what is in my cell A5:
"Model:55555 blue toy car"
I want to extract '55555' from the whole string and display it into a different cell (D4).
I have:
Start = InStr("Model:", A5) + 6
Range("D4").Value = Mid(A5, InStr("Model:", A5) + 6, 5)
When I run this, nothing shows up i cell D4.
To debug it, I threw in: "Range("C2").Value = Start"
and C2 displays a 7 so I know the first line of code works. I looked up the Mid function and the format seems to be Mid("string", n, length). I can't put in
"Model:55555 blue toy car" as the string because the model number will change so I want a more general code. Is there a different function besides MID that will work better?