Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Reginheraht Fischer   on Nov 12 In MS Office Category.

  
Question Answered By: Julia Hughes   on Nov 12

My most recent attempt seems to be working fairly well. What I am
doing now is to preset the font to Arial Bold Italic 10 and use a 90
character line cut-off, which is a couple of characters short of the
total line space, and then increase the height by 15 with every
additional 90-character-increment. I'm hoping that allowing a
couple characters leeway for each line will allow for the
proportional font.
I'll have to ask the supervisors if it's going to be enough,
but I increased the limit to 270 characters which is 3 total lines.
If they say it should be more, I can keep going, of course.
Initial tests showed it to look pretty good. The code is very
simple, and in fact a lot simpler than I expected:

Dim comlen as integer
comlen = Len(ActiveCell.Value)
Range(Cells(nxrow, 1), Cells(nxrow, 6)).Select
With Selection.Font
.Bold = True
.Italic = True
.Size = 10
End With
If comlen < 91 Then
Selection.Rows.RowHeight = 15.75
ElseIf comlen < 181 Then
Selection.Rows.RowHeight = 31.5
ElseIf comlen < 271 Then
Selection.Rows.RowHeight = 47.75
End If
'then the code goes on to merge cells,
'and add a border to set the comment off
'from the numbers

They are telling me that it's rare to have that long a comment,
so I'm hoping that the formatting  will fit for 99% of the cases.

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on merged cells formatted by text length for height Or get search suggestion and latest updates.


Tagged: