Augmenting Excel Row Heights by a Set Value
top of page

Augmenting Excel Row Heights by a Set Value

Recently when editing a long spreadsheet in order to confirm that each row was wide enough to display all of the text inside a cell, I ran into some trouble beyond that posed by cells with too much text to fully display with the maximum row height of 409.5. While Excel's AutoFit Row Height tool on the Home tab usually sets most rows to the correct width, it will not infrequently cut off a line or two of text from rows with cells that contain more than a couple of thousand characters.



In order to address this problem, you can make use of the macro posted here, by Robin. The vba code is copied below.


This code, will augment each row that is specified in a range by a fixed amount that you designate. So if you want to increase rows 2 to 5 by 10 points enter 'rowRow.RowHeight + 10' at the end of the fourth line, and specify 2:5 in quotes in the In Rows parentheses on the third line.





Option Explicit

'v0.1.0

Sub sbChangeRowHeightMulti()

Application.ScreenUpdating = False

Dim rowRow As Range

For Each rowRow In Rows("2:5")

rowRow.RowHeight = rowRow.RowHeight + 10

Next rowRow

Application.ScreenUpdating = True

End Sub




Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page