Need to edit string in cell
If your text can **never** have a hyphen in **front** of the job number,
then you can do this..
Text = "hello:07-021 goodbye"
JobNum = Mid(Text, InStr(Text, "-") - 2, 6)
--
Rick (MVP - Excel)
"jorlypong" wrote in message
...
I am learning some vba and am trying to delete some useless info both
before
and after my needed info (job #)
ex. "hello:07-021 goodbye"
I need to have the "hello:" and " goodbye" leaving only the job number.
Note: all the job numbers start with two digits, have a hyphen, and end
with
three digits such as "00-000"
Any help would be great . . . thank you
|