Using a variable row hieght in Excel

J

jerrybdot

Auto Row Height puts the row lines too close to the text. I would like to
have "Auto Height + 12pts" or something like that, so the text and the lines
are not so cluttered together. Something like we can already do in paragraph
settings in Word.

Details: Each row has a different number of lines of text.

I don't want to manually adjust each row (which is what I am doing now),
since there will be more text added to the document as time goes on.

I am using Ariel 10pt and it must stay Ariel 10pt.

Thank you for any suggestions! Jerrybdot
 
A

Aussie Bob C

Change row one to 12pt Arial font.
Check & note the row height.
Move down the row numbers until the curser changes to a cross hair, right
click & select Row Height from menu & note the row height.
Change row one back to 10pt Arial font.
Select all rows by clicking on the square to the left of the column letter A.
Move down the row numbers until the curser changes to a cross hair, right
click & select Row Height from menu, enter the row height for 12 pt.
While all rows are selected go to format cells and change vertical alignment
to center.

This can be done with a VBA macro.


--
Thank you

Aussie Bob C
Little cost to carry knowledge with you.
Win XP P3 Office 2007 on Mini Mac using VMware.
 
D

Dave Peterson

You could use a macro:

Option Explicit
Sub testme()

Dim myAdjustment As Double
Dim myRow As Range

myAdjustment = 12

With Worksheets("Sheet1")
With .UsedRange
.Rows.AutoFit
For Each myRow In .Rows
myRow.RowHeight = myRow.RowHeight + myAdjustment
Next myRow
End With
End With

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
 
J

jerrybdot

Absolutely perfect! Thank you very much!

Dave Peterson said:
You could use a macro:

Option Explicit
Sub testme()

Dim myAdjustment As Double
Dim myRow As Range

myAdjustment = 12

With Worksheets("Sheet1")
With .UsedRange
.Rows.AutoFit
For Each myRow In .Rows
myRow.RowHeight = myRow.RowHeight + myAdjustment
Next myRow
End With
End With

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top