Thread
:
Modification of Part Numbers
View Single Post
#
2
Don Guillett
Posts: n/a
this should do it. Use this to test and then change
msgbox
to
c.value=
Sub addnuminstr()
For Each c In Selection
X = InStr(c, " ") - 1
MsgBox Left(c, X) & 1212 & Right(c, Len(c) - X)
Next c
End Sub
--
Don Guillett
SalesAid Software
"Tiziano" wrote in message
...
I would like to add the string "1212" (no quotes)
to some part numbers.
Essentially, I have two versions of part numbers
to modify:
xxxxxxx(space)(space)xxxxxxxxxx
or
xxxxxxxxxx(space)xxxxx(space)(space)xxxxxxx
The length of the xxxxxx strings varies and represents
alphanumeric characters that must remain unchanged.
The end result of the modification should be as
follows:
xxxxxxx1212(space)(space)xxxxxxxxxx
or
xxxxxxxxxx1212(space)xxxxx(space)(space)xxxxxxx
Would somebody please suggest how to do it? This is
beyond my knowledge of Excel.
Thanks in advance.
----
Tiziano
Reply With Quote