CharacterLimit

G

Guest

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
 
B

Bernie Deitrick

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
 
T

Tom Ogilvy

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.
 
G

Guest

thanks for your help
--
mike


Bernie Deitrick said:
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
 
G

Guest

Tom
thanks for your help
--
mike


Tom Ogilvy said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top