View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jamie.cutting@mouchelparkman.com is offline
external usenet poster
 
Posts: 17
Default Relacing partial text strings

I am trying to put together a macro to run behind a worksheet that
will preform the following procedures:

IF column B contains "PRO", "NOP" or "VAL" at the end of a text string
(eg. 2007/4/SH4A/90507/PRO) and Column CW =1, then copy the row to the
next availble row down and replace "PRO" with "CONP", "NOP" with
"CONN" and "VAL" with "CONV" in the target name (i.e. the pasted row).
Then go back and change the original copied names from "PRO" to
"VoidP", "NOP" to "VoidN" and "VAL" to "VoidV".

Im not sure of the best way to search and replace etxt strings in VB
and all attempts to date have been in vein.

Any advice on the best way of achieving this would be gratefully
appreciated.