Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Remove specified value from string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Todd Huttenstine - 31 Jan 2006 16:31 GMT
I didnt see this post the 1st time I sent so sorry if this is a
duplicate.

I have the following string:
"7D: test comment"

I would like to remove the "7D: " from the above string.
How do I do this?

Thanks
Todd
Gary Keramidas - 31 Jan 2006 16:34 GMT
one way if your example is in B2

=RIGHT(B2,LEN(B2)-FIND(":",B2,1)-1)

Signature

Gary

>I didnt see this post the 1st time I sent so sorry if this is a
> duplicate.
[quoted text clipped - 7 lines]
> Thanks
> Todd
Gary Keramidas - 31 Jan 2006 16:48 GMT
here's a code solution that may work for you

Option Explicit
Dim arr As Variant
Dim s As String

Sub test()
s = Range("b2").Value
On Error Resume Next
arr = Split(s, ":")
Range("c5").Value = Trim(arr(1))
End Sub

Signature

Gary

>I didnt see this post the 1st time I sent so sorry if this is a
> duplicate.
[quoted text clipped - 7 lines]
> Thanks
> Todd
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.