Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tiziano
 
Posts: n/a
Default Modification of Part Numbers

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


  #3   Report Post  
Tiziano
 
Posts: n/a
Default

Don,

Following your suggestion, I have created the macro,
but when I try to run it I get an Invalid Procedure
Call Or Argument message.
I have copied and pasted the macro exactly as you
have written it. My Macro Security is set to Medium.
I am using Excel 2000.
Thanks.
----
Tiziano

"Don Guillett" wrote in message
...
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
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






  #4   Report Post  
Tiziano
 
Posts: n/a
Default

Correction, Don!
Your macro works just fine. The problem is that I have
not described the structure of my part numbers correctly.

I will post my question with more details in a new message.

Thanks for your help.
----
Tiziano

"Tiziano" wrote in message
...
Don,

Following your suggestion, I have created the macro,
but when I try to run it I get an Invalid Procedure
Call Or Argument message.
I have copied and pasted the macro exactly as you
have written it. My Macro Security is set to Medium.
I am using Excel 2000.
Thanks.
----
Tiziano

"Don Guillett" wrote in message
...
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
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Converting Numbers to Text properly Shirley Munro Excel Discussion (Misc queries) 1 February 16th 05 03:01 PM
Part Number/Qty Consolidations [email protected] Excel Discussion (Misc queries) 2 February 6th 05 09:21 PM
how to format numbers stored as text or vice versa to use vlookup teneagle Excel Worksheet Functions 1 February 3rd 05 10:41 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 10:19 PM


All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"