Nov 12 2021 11:12 AM
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
Nov 12 2021 11:35 AM
Nov 12 2021 12:05 PM
Nov 12 2021 12:24 PM
Here 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
Nov 12 2021 01:00 PM
Nov 12 2021 01:48 PM
Do you have horizontally merged cells (for example A1 and B1), or vertically merged cells (for example A1 and A2), or both?
Nov 12 2021 01:50 PM
Nov 12 2021 02:21 PM
Nov 12 2021 02:23 PM
SolutionThat complicates things enormously. I'd either unmerge the cells, or resize the rows manually.
Nov 12 2021 02:27 PM
Nov 12 2021 02:29 PM
Where are the merged cells? All in the same columns (for example B/C)? Or does it vary from row to row? And are there multiple merged cells in the same row?
Nov 12 2021 02:34 PM
Nov 12 2021 02:41 PM
Again: I'd unmerge the cells.
Nov 12 2021 02:43 PM
Nov 12 2021 02:47 PM
Sorry about that. In the future, try to avoid merged cells, especially if you want to wrap text.
Nov 12 2021 02:51 PM
Nov 12 2021 02:52 PM
That is probably not an attractive option.
Nov 12 2021 03:04 PM
Nov 12 2021 02:23 PM
SolutionThat complicates things enormously. I'd either unmerge the cells, or resize the rows manually.