Forum Discussion
Robert1290
Nov 12, 2021Brass Contributor
Excel change row height based on font size
Hi,
Is there a way of making excel change the row height, dependant on the font size in the cells, e.g. if font size is 12, then make row height 18...
Thanks
Rob
That complicates things enormously. I'd either unmerge the cells, or resize the rows manually.
17 Replies
- Robert1290Brass ContributorHansVogelaar
Yes they will, and there are merged cells too.
There will likely be 4 or 5 different font sizes in a document.
Happy for VBA too, you helped me on my other VBA code that I still use 🙂
RobHere is macro you can run:
Sub FixHeights() Dim rng As Range Application.ScreenUpdating = False For Each rng In Intersect(Range("A:A"), ActiveSheet.UsedRange) rng.RowHeight = 1.5 * rng.Font.Size Next rng Application.ScreenUpdating = True End Sub