View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to check if cell contents overflow.

If it is the longest string in the column.
record the column width, then autofit the column - record the width, then
restore the old width. Compare the old width to the autofit width. It the
autofit width is larger.

Otherwise, you might have to create a dummy sheet. Copy over the cell and
perform the above test, then delete the sheet. Beyond that, I think you
would need to get into some heavy API work.

--
Regards,
Tom Ogilvy

"Alan Savage" wrote in message
...
Hi,

Does anyone know how to find out if the contents of a cell in a Excel
Worksheet overflow in the cell? Using string length does not work ideally

as
some characters take up more room than others.

TIA

Alan