Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to check if cell contents overflow.

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba to check cell contents Steve Excel Discussion (Misc queries) 2 July 29th 09 04:58 PM
check for repetition of cell contents David Excel Worksheet Functions 1 September 14th 06 09:31 AM
Check cell contents before print nobbyknownowt Setting up and Configuration of Excel 3 May 26th 06 11:48 PM
Fussy check of cell contents access_mk Excel Discussion (Misc queries) 1 April 19th 06 01:28 PM
IF statement to check cell contents Lance Gray Excel Worksheet Functions 1 May 29th 05 10:53 PM


All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"