On Thu, 10 Aug 2006 14:34:02 -0700, srroduin
<srroduin@discussions.microsoft.com> wrote:

>I have numerous emails that have an additional #mailto:blahblahblah on the
>end. Is there a way to write a macro or use a formula that would remove
>everything starting with the # sign?
>
>For example:
>
>mydogspot@doggy.com#mailto:Spot
>
>and change to:
>
>mydogspot@doggy.com
>
>Each cell, starting at F2, has a different length of characters after the #.
>
>Thanks in advance.


Perhaps something like this will get you started:

=============================
Option Explicit
Sub TrimEmail()
Dim c As Range
Dim i As Long

For Each c In Selection
i = InStr(1, c.Text, "#")
If i > 0 Then
c = Left(c.Text, i - 1)
End If
Next c
End Sub
=======================


--ron