Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete value in a string
I have the following string:
"7D: test messages" I would like to remove the value "7D: " from the string How do I do this? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete value in a string
See previous post
=SUBSTITUTE(A1,"7D: ","") in the light of other posts -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Todd Huttenstine" wrote in message oups.com... I have the following string: "7D: test messages" I would like to remove the value "7D: " from the string How do I do this? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete value in a string
Use the =REPLACE() function:
Sub Macro1() Dim s As String s = "ab" s = Replace(s, "a", "") MsgBox (s) End Sub -- Gary's Student "Todd Huttenstine" wrote: I have the following string: "7D: test messages" I would like to remove the value "7D: " from the string How do I do this? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete value in a string
What did you mean by
Use the =REPLACE() function: showing it as a worksheet function. The arguments for the Replace worksheet function a =REPLACE(old_text,start_num,num_chars,new_text) Did you mean the worksheetfunction Substitute instead or were you actually refering to the Replace VBA function (introduced in xl2000) which you later demo'd in your code and not intending to imply a worksheet solution at all? Or is there a third interpretation? Just confusing what you meant. -- Regards, Tom Ogilvy "Gary''s Student" wrote in message ... Use the =REPLACE() function: Sub Macro1() Dim s As String s = "ab" s = Replace(s, "a", "") MsgBox (s) End Sub -- Gary's Student "Todd Huttenstine" wrote: I have the following string: "7D: test messages" I would like to remove the value "7D: " from the string How do I do this? Thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete value in a string
Just select all the data and do Edit / Replace, Replace '7D: ' (No quotes)
with nothing. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ------------------------------*------------------------------*---------------- It's easier to beg forgiveness than ask permission :-) ------------------------------*------------------------------*---------------- "Todd Huttenstine" wrote in message oups.com... I have the following string: "7D: test messages" I would like to remove the value "7D: " from the string How do I do this? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete a string | Excel Worksheet Functions | |||
delete a - if it is the last part of a string | Excel Discussion (Misc queries) | |||
How to delete tables with a certain string in the name? | Excel Programming | |||
Delete Column Containing String | Excel Programming | |||
Delete carrots in a string | Excel Worksheet Functions |