View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default shortening text in cells

Hi srroduin,

There are a few ways you can do this without VBA code:

1) Use Text to Columns: Select Data | Text to Columns, Delimited, put # in
other, Next, select col 2 then select "Do not import column (skip)", Finish.

2) Use a formula like this:

=LEFT(F2,IF(ISERROR(SEARCH("#",F2)),LEN(F2),SEARCH ("#",F2)-1))

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


srroduin 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:

#mailto:Spot

and change to:



Each cell, starting at F2, has a different length of characters after
the #.

Thanks in advance.