Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default string function 2

I have a cell that contains the following "Email: "

how do I delete the email and semicolon and move the actual email address al
the way to the left of the cell

so I would be deleting the email word

thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default string function 2

not sure if this is what you want, but if your data is in A1, try either of
these:

Sub test()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
With ws
.Range("A1").Value = Replace(.Range("A1").Value, "Email: ", "")
End With
End Sub


Sub test2()
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
With ws
..Range("A1").Value = Right(.Range("a1"), Len(.Range("a1")) - InStr(1, _
.Range("A1"), ":") - 1)
End With
End Sub




--

Gary
Excel 2003


"dstiefe" wrote in message
...
I have a cell that contains the following "Email: "

how do I delete the email and semicolon and move the actual email address
al
the way to the left of the cell

so I would be deleting the email word

thank you


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default string function 2

Not knowing if the space will be after the colon or how many spaces might be
there, maybe this would work. Assume the data is in cell A1.

Sub getURL()
Range("A1").Characters(1, 6).Delete
Range("A1") = Trim(Range("A1"))
End Sub


"dstiefe" wrote:

I have a cell that contains the following "Email: "

how do I delete the email and semicolon and move the actual email address al
the way to the left of the cell

so I would be deleting the email word

thank you

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
Function to evaluate function as string Basil Excel Worksheet Functions 3 September 18th 09 10:43 AM
string function help Eelinla Excel Discussion (Misc queries) 5 April 21st 07 08:26 PM
VBA function : How to search a string in another string? bibi-phoque Excel Programming 5 April 19th 05 06:24 PM
String function jason Excel Programming 3 April 7th 05 10:20 PM
String Function Brenda Excel Programming 5 February 4th 05 03:24 AM


All times are GMT +1. The time now is 03:33 AM.

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"