Row height question

stefanaalten

Board Regular
Joined
Feb 1, 2011
Messages
71
Office Version
  1. 365
Platform
  1. Windows
How can I set row height to two lines of text as a minimum, or more if cell contents requires it?

The row height should vary according to the font size. The entire worksheet will be in the same font size. Selecting the entire worksheet and increasing/decreasing font size should change the row height accordingly.

If a row contains nothing at all, then the row height should still be two lines. If a row contains a cell with a long entry that will wrap over more than two lines, then the row height should automatically expand to accommodate the text (to three lines or more).

I thought it was an easy one but so far I haven't been able to figure it out for myself or by searching this forum. Can anyone please help?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
If you set cell properties to Wrap Text, then the row heights will adapt automatically. Furthermore you can autofit row heights by selecting the rows you want to autofit, and then doubleclicking the handle you would use to change the rowheight (similar technique as for column widths).

Autofit will not fit to two lines for empty rows though...

One big caveat: if you have merged cells, autofit and text wrap do not change the rowheight anymore (at least in Excel 2003, not sure if this is still an issue in later versions).
 
Upvote 0
Thanks Hermanito but I'm afraid that does not answer my question ... I'd like to set the row height (even for blank cells) to exactly two lines - as you say, autofit would not work in this scenario.
 
Upvote 0
my answer was meant to show there is no easy way to do what you want... autofit comes closest and maybe you could accept that as a compromise :stickouttounge:

With VBA you could maybe do more, but it is very difficult to determine what rowheight corresponds with 2 lines... depends on fonts, screen dpi settings, maybe even resolution settings... imho: not a road you want to go on...
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top