Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how to find out if text in the Excel cell will be trancated?

Hi everybody,

Is there a way to find out if the text in the cell will not be
displayed completely (for inst., if text in A1 is 100 characters long,
it is going to be displayed in full only if the columns B1, C1, D1 etc
are empty, but if they are not, the text will not be displayed in
full).

I would like to know if there is a way to find out if the text is
going to be trancated without knowing if the neighbouring cells
contain anything.

Thank you!

Viktor
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to find out if text in the Excel cell will be trancated?

inexact, but the

if len(Range("A1")) Range("A1").ColumnWidth then
msgbox "Possiblity text is wider than column"
End if

Columnwidth is measured units of character width:

One unit of column width is equal to the width of one character in the
Normal style. For proportional fonts, the width of the character 0 (zero) is
used.

Regards,

Tom Ogilvy




"Viktor" wrote in message
om...
Hi everybody,

Is there a way to find out if the text in the cell will not be
displayed completely (for inst., if text in A1 is 100 characters long,
it is going to be displayed in full only if the columns B1, C1, D1 etc
are empty, but if they are not, the text will not be displayed in
full).

I would like to know if there is a way to find out if the text is
going to be trancated without knowing if the neighbouring cells
contain anything.

Thank you!

Viktor



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how to find out if text in the Excel cell will be trancated?

Hi Tom,
Thanks a lot for your reply. However, it does not solve my problem. I
know how to figure out if the text is larger then the column, but that
does not mean that it will be trancated: if, say, the next couple of
columns are empty, it will be displayed in full. How can I know if the
text is going to be trancated without checking if there is anything in
B1 or C1?

Of course, I can loop through columns (B1, C1, D1 etc) to see if they
are empty and if not, see if their total width is more then the text
width in A1, but that would mean a lot of extra processing.

What I was hoping for, is that there is some kind of a property for a
text in A1 that would indicated if A1 text is going to be trancated
because there is some data in, say D1 and the text in A1 is longer
then (A1+B1+C1) so it will not be displayed in full.

I hope this explenation is clear.

Thanks everyone.

Viktor


"Tom Ogilvy" wrote in message ...
inexact, but the

if len(Range("A1")) Range("A1").ColumnWidth then
msgbox "Possiblity text is wider than column"
End if

Columnwidth is measured units of character width:

One unit of column width is equal to the width of one character in the
Normal style. For proportional fonts, the width of the character 0 (zero) is
used.

Regards,

Tom Ogilvy




"Viktor" wrote in message
om...
Hi everybody,

Is there a way to find out if the text in the cell will not be
displayed completely (for inst., if text in A1 is 100 characters long,
it is going to be displayed in full only if the columns B1, C1, D1 etc
are empty, but if they are not, the text will not be displayed in
full).

I would like to know if there is a way to find out if the text is
going to be trancated without knowing if the neighbouring cells
contain anything.

Thank you!

Viktor

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
Find text in a cell and copy text to another cell Shaun Excel Discussion (Misc queries) 6 July 4th 07 05:25 PM
find text in cell and replace it with part of the text in that ce. jules Excel Discussion (Misc queries) 3 May 3rd 07 10:18 AM
In Excel, how do I find one word in a set of text in a cell? man818 Excel Discussion (Misc queries) 4 May 20th 06 02:20 PM
Find text within cell then display text to left Jambruins Excel Discussion (Misc queries) 5 April 17th 06 10:01 PM
find number position in excel text cell Don Excel Discussion (Misc queries) 5 April 7th 06 09:34 PM


All times are GMT +1. The time now is 11:36 PM.

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

About Us

"It's about Microsoft Excel"