Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default 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
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
Delete a string Joe Gieder Excel Worksheet Functions 5 October 3rd 08 07:39 PM
delete a - if it is the last part of a string deb Excel Discussion (Misc queries) 1 September 21st 08 01:18 AM
How to delete tables with a certain string in the name? Henrootje Excel Programming 3 November 16th 05 02:46 PM
Delete Column Containing String scott Excel Programming 3 January 19th 05 11:12 PM
Delete carrots in a string [email protected] Excel Worksheet Functions 2 November 9th 04 02:10 AM


All times are GMT +1. The time now is 02:35 PM.

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"