PC Review


Reply
Thread Tools Rate Thread

Cond format if Len() is greater or equal to 255 in a code.

 
 
driller
Guest
Posts: n/a
 
      19th Jun 2008
Good day,

I oftenly prepare draft sheets in separate workbooks and after refining
them, i converged these sheets in one workbook.

My problem is I need to maintain the contents of cells > 255 characters
during the drag and drop of sheet tabs or copy paste of range of cells.

I think that maybe by a code, I can retain the contents during sheet
transfer. I'm confident that this forum can give solution to my basic problem.

thanks for any advise.
--
regards,

 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      19th Jun 2008
I don't think you are loosing character. I think you are just not seeing all
the characters. Try put =len(A1) at the cell location you are copying and
then the same for the destination cell and see if the length is changing.

"driller" wrote:

> Good day,
>
> I oftenly prepare draft sheets in separate workbooks and after refining
> them, i converged these sheets in one workbook.
>
> My problem is I need to maintain the contents of cells > 255 characters
> during the drag and drop of sheet tabs or copy paste of range of cells.
>
> I think that maybe by a code, I can retain the contents during sheet
> transfer. I'm confident that this forum can give solution to my basic problem.
>
> thanks for any advise.
> --
> regards,
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      19th Jun 2008
If you're manually copying a worksheet that has a cell that's longer than 255
characters, then you should see a prompt that some of the cells will be
truncated to 255 characters.

You won't see this prompt if you're doing the copy in code.

The way around it is to copy the sheet, then go back and copy the cells and
paste them.

In code, you'd use something like:

dim wks as worksheet
dim newWks as worksheet

set wks = worksheets("somesheetname")

wks.copy 'to a new workbook?
set newwks = activesheet

'go back and get the values (including the long ones)
wks.cells.copy _
destination:=newwks.range("a1")


driller wrote:
>
> Good day,
>
> I oftenly prepare draft sheets in separate workbooks and after refining
> them, i converged these sheets in one workbook.
>
> My problem is I need to maintain the contents of cells > 255 characters
> during the drag and drop of sheet tabs or copy paste of range of cells.
>
> I think that maybe by a code, I can retain the contents during sheet
> transfer. I'm confident that this forum can give solution to my basic problem.
>
> thanks for any advise.
> --
> regards,


--

Dave Peterson
 
Reply With Quote
 
driller
Guest
Posts: n/a
 
      19th Jun 2008
thanks for the help, i'll place the code and set more trials...
<>
best regards
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Greater/Less Than or Equal To Hoov Microsoft Excel Misc 10 14th May 2009 05:54 PM
Greater/Less Than or Equal To Hoov Microsoft Excel Misc 0 14th May 2009 03:54 PM
IF with Equal to or Greater than sonicj Microsoft Excel Misc 4 1st May 2008 09:02 PM
Greater than or equal to xned Microsoft Excel Discussion 1 3rd Apr 2006 08:35 AM
greater than or equal to and less than or equal to symbols won't s =?Utf-8?B?bGFyYWxlYQ==?= Microsoft Word Document Management 1 1st Jun 2005 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:27 AM.