Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
one way
Sub test() Dim mystring As String, newstring As String mystring = "995451/U" newstring = Replace(mystring, "/", "-", 1) MsgBox newstring End Sub -- Gary "KS" wrote in message oups.com... Hello all. I have a macro in which I save the document creating the filename based on selected text in the document. However in some cases, the selected text looks like "995451/U." Obviously I cannot save using this name. I would like to convert this to "995451-U" for saving purposes only but NOT in the document. How can I do this? Thanks, KS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel-Match 1st text character in a string to a known character? | Excel Worksheet Functions | |||
How do I replace last numeric string from a alphanumeric string? | Excel Discussion (Misc queries) | |||
Function to return Character Position of Xth character within a string | Excel Programming | |||
How do I replace * as a character in a string in Excel? | Excel Programming | |||
How to replace this character ... | Excel Programming |