View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Cell cropping with a Macro or VB

If PBL is always at the end of the string and preceded by a blank:

in B1 put:

=LEFT(A1,LEN(A1)-4)


and copy down.

You can then copy (Col B)/pastespecial/values into col A.

"Alastair79" wrote:

I need to be able via a macro to copy only a portion of a cells contents to a
different part of the sheet. What I have is like below:-

"CLOBMIDDLETON PBL" or "CLOBDIDCOT PBL"

I need to get ride of the "PBL" part and as you can see the first part of
the cell varies in length. Is there any way to tell excel to copy till the
space?

Thanks............. Alastair.