Set All Excel Rows to the Height of the Highest
top of page

Set All Excel Rows to the Height of the Highest

You can use the below vba code, available here on the Extend Office site, to automatically adjust all of the rows on an Excel worksheet to the height of the highest row.


The process is simple. Right click on cell which contains the most text. (If you're not sure, you can use the LEN formula to find which cell has the greatest number of characters.) Check the height of that row, and then copy it into the column to the right of the data on the worksheet for all rows.


Run the macro, and then select the column which contains the height of the highest row. All of the rows will be set to that height!






Sub rowheight()

'Updateby Extendoffice

Dim hgt As Variant

Dim WorkRng As Range

xTxt = ActiveWindow.RangeSelection.Address

Set WorkRng = Application.InputBox("please select the data range:", "Kutools for Excel", xTxt, , , , , 8)

For Each H In WorkRng

If H.Value > 15 Then

hgt = H.Value

H.EntireRow.Select

Selection.rowheight = hgt

End If

Next H

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