Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a string between two delimeters and replace with text
I have a range of cells in which I must replace a string between ":" and ")"
with a new a new string. Thanks in advance for your ideas. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a string between two delimeters and replace with text
Try some code like the following
Dim S As String Dim Pos1 As Long Dim Pos2 As Long S = "123:asdf)abs" Pos1 = InStr(S, ":") Pos2 = InStr(S, ")") S = Left(S, Pos1 - 1) & "new text" & Mid(S, Pos2 + 1) Debug.Print S -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jeff" wrote in message ... I have a range of cells in which I must replace a string between ":" and ")" with a new a new string. Thanks in advance for your ideas. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a string between two delimeters and replace with text
Thanks,Chip. How do I get 'S' to refer to the active cell in which I want
to replace the tect? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to copy text between two different delimeters | New Users to Excel | |||
Find and replace part of a text string | Excel Discussion (Misc queries) | |||
Excel - Find & Replace text in a string | Excel Programming | |||
Excel - Find & Replace text in a string | Excel Worksheet Functions | |||
Find/Replace String | Excel Programming |