View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
OxanaB OxanaB is offline
external usenet poster
 
Posts: 3
Default Trimming Email addresses

Hi,
I have a column with Email addresses like:
Email
Email
nbsp Please send written requests to <sjohnson@usaid
TO .

I nee to trim them on both sides so I will have only Email address and
nothing else.
I used this:
Sub trimcells()
For Each cel In Selection
cel.Value = Trim(Right(cel, Len(cel)""), Left(cel, Len(cel)"<"))
Next cel
End Sub
It doesn't work.
I will appreciate any help.
Thank you.
Oxana.