View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default truncating pasted text after 250 characters

Hi
try the following:
1. Insert this macro in one of your VBA modules
Sub trunc_left()
Dim rng As Range
Dim c As Range
Set rng = Selection
For Each c In rng
c.Value = Left(c.Value, 250)
Next
End Sub

2. Paste your values in column I
3. Select these cells and invoke the macro - Cells will be truncated

The truncation will not take plase automatically when pasting but you
have to start the macro afterwards


--
Regards
Frank Kabel
Frankfurt, Germany

Sorry about that... It's still early and I'm not fully awake yet...

I used the formula you posted and the subroutine I posted above, but
the text is still not being truncated when pasted into column I. For
example, let's say I have 10 rows of text being pasted into column I
starting at I2. I1 is the column name header. All the information

is
being pasted correctly, but nothing is being truncated.




Frank Kabel wrote:
[b]Hi
what is your problem. A little bit more detail would be helpful :-)



---
Message posted from http://www.ExcelForum.com/