ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CharacterLimit (https://www.excelbanter.com/excel-programming/328572-characterlimit.html)

Mike

CharacterLimit
 
I know this question has been asked before. If I am copying a cell that has
more than 255 characters into a another cell, the copied section is truncated.
Is there any way to insert into a macro program to copy a entire cell
contents into another cell without truncating.

thanks for any help
--
mike

Bernie Deitrick

CharacterLimit
 
Mike,

Actually, that limitation only apples when you copy an entire sheet. Any
code to copy and paste cells or cell ranges should take the whole cell, up
to the limit of a cell's capacity, 32K characters or so. For example:

Range("B2").Copy Range("B8")

Works without any string size limit.

HTH,
Bernie
MS Excel MVP


"mike" wrote in message
...
I know this question has been asked before. If I am copying a cell that

has
more than 255 characters into a another cell, the copied section is

truncated.
Is there any way to insert into a macro program to copy a entire cell
contents into another cell without truncating.

thanks for any help
--
mike




Tom Ogilvy

CharacterLimit
 
I can't reproduce that behavior. If you copy an entire sheet, then you may
encounter this. The recommended workaround is to copy the cells, so you
assessment doesn't sound correct.

ActiveCell.Value = application.Rept("A",2000)
ActiveCell.Offset(1,0).Value = ActiveCell.Value
? len(activeCell.Offset(1,0))
2000

so this copied 2000 characters from the activecell to the one below it.

--
Regards,
Tom Ogilvy


"mike" wrote in message
...
I know this question has been asked before. If I am copying a cell that

has
more than 255 characters into a another cell, the copied section is

truncated.
Is there any way to insert into a macro program to copy a entire cell
contents into another cell without truncating.

thanks for any help
--
mike




Mike

CharacterLimit
 
thanks for your help
--
mike


"Bernie Deitrick" wrote:

Mike,

Actually, that limitation only apples when you copy an entire sheet. Any
code to copy and paste cells or cell ranges should take the whole cell, up
to the limit of a cell's capacity, 32K characters or so. For example:

Range("B2").Copy Range("B8")

Works without any string size limit.

HTH,
Bernie
MS Excel MVP


"mike" wrote in message
...
I know this question has been asked before. If I am copying a cell that

has
more than 255 characters into a another cell, the copied section is

truncated.
Is there any way to insert into a macro program to copy a entire cell
contents into another cell without truncating.

thanks for any help
--
mike





Mike

CharacterLimit
 
Tom
thanks for your help
--
mike


"Tom Ogilvy" wrote:

I can't reproduce that behavior. If you copy an entire sheet, then you may
encounter this. The recommended workaround is to copy the cells, so you
assessment doesn't sound correct.

ActiveCell.Value = application.Rept("A",2000)
ActiveCell.Offset(1,0).Value = ActiveCell.Value
? len(activeCell.Offset(1,0))
2000

so this copied 2000 characters from the activecell to the one below it.

--
Regards,
Tom Ogilvy


"mike" wrote in message
...
I know this question has been asked before. If I am copying a cell that

has
more than 255 characters into a another cell, the copied section is

truncated.
Is there any way to insert into a macro program to copy a entire cell
contents into another cell without truncating.

thanks for any help
--
mike






All times are GMT +1. The time now is 12:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com