View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Trevor Williams Trevor Williams is offline
external usenet poster
 
Posts: 181
Default Set Row Height depending on cell content...

I've just re-read your answer and realised what you mean - If, after autofit,
the row is 12.75 and <22.50 then make the row height 22.50...

I think I can do that - thanks again Tom

T

"Tom Ogilvy" wrote:

Why not autofit the row and then make adjustments based on the resulting row
height.

But there is no built in attribute to tell you how many lines are in the
cell.

--
Regards,
Tom Ogilvy


"Trevor Williams" wrote:

I'm asking if it's possible to determine the number of lines of text in a
cell based on a fixed column width, but not a known text length. - infact,
it's one line of text that is wrapped in the cell, so how many times the text
is wrapped... Hope that makes sense.

"JLGWhiz" wrote:

Are you asking if there is a maximum number of lines that can be entered in a
cell or are you asking if a user can determine the number of lines based on a
fixed column width and a known text length?

"Trevor Williams" wrote:

Hi All

I need to set the row height depending on the number of lines of text
contained in a cell. Cells that contain text have wordwrap on - if there is
only 1 line of text in the cell the row height should be 12.75, 2 lines of
text should be 22.50 and so on.

Is it possible to determine how many lines of text are in a cell?

Thanks

Trevor