top of page

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



 
 

If you don't want to use the HYPERLINK function in Excel to create links on a spreadsheet, but instead want to automatically add in 'static' hyperlinks that don't rely upon the dynamic information in the function, you can use the below vba code.


Begin with a worksheet like this, with the names to be displayed for the links in one column, and the file paths for the links in the column to the right.





Edit the visual basic code so that the range listing the file paths is listed:



The macro will automatically create hyperlinks in the second column.





Sub CreateHyperlinks()

Dim cl As Range


For Each cl In Range("B2:B3").Cells '## Modify as needed

cl.Hyperlinks.Add cl, cl.Value, , , cl.Offset(0, -1).Value

Next


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