cell comment limits

  • Thread starter Thread starter JulieD
  • Start date Start date
J

JulieD

Hi All

can't find this is excel specifications - is there any limit to the number
of characters that a cell comment can contain?

Cheers
JulieD
 
JulieD, from a previous post, by Chip

I'm not sure, so I pasted about 60K of text into a comment. It chopped it
off at about 11K. Interestingly, it chopped it off at 255 lines, which may
be the limiting factor. Intuitively, I'd guess 32K total, but only 255
lines.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
Hi

thanks for this.

Cheers
JulieD

Paul B said:
JulieD, from a previous post, by Chip

I'm not sure, so I pasted about 60K of text into a comment. It chopped it
off at about 11K. Interestingly, it chopped it off at 255 lines, which
may
be the limiting factor. Intuitively, I'd guess 32K total, but only 255
lines.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
The following macro suggests that Chip is correct at a size of 32K, or 255
lines, whichever comes first.
This returns 32768 which is the same as 2^15
If you change 1000 to 10, as in
s = Space(1) & String(10, "x") & "_z"
Then I get only 255 lines.

Sub Comment_Size_Question()
Dim j As Long
Dim s As String
Dim v
Dim Total As Double

'Just some junk text
s = Space(1) & String(1000, "x") & "_z"
Columns(1).Delete
Range("A1").AddComment Format(1, "0000000000") & s
For j = 2 To 1000
With Range("A1").Comment
.Text .Text & vbLf & Format(j, "0000000000") & s
End With
Next j
Range("A1").Comment.Visible = True
Range("A1").Comment.Shape.TextFrame.AutoSize = True
v = Range("A1").Comment.Text
v = Split(v, vbLf)
For j = 0 To UBound(v)
Total = Total + Len(v(j))
Next j
Debug.Print Total + UBound(v) + 1
End Sub
 
Back
Top