Automatic height adjustment of merged cells across worksheet

Clair2004

New Member
Joined
Jan 23, 2019
Messages
1
Hi All

I have looked a previous threads and not quite got there. I have a worksheet with various merged cell ( yes I have tried to avoid them but the text needs to be left justified so Centre across selection doesnt work) In the end I think I need some code to place into a worksheet which would autofit height for merged cells. I hope this makes sense. Thanks in advance

C
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

EFANYoutube

Active Member
Joined
May 19, 2017
Messages
278
I can't quite make out exactly what you want but hope this is Clair enough for you

This changes row height regardless of merges but you can cover many cells by changeing the rows() numbers

Code:
ThisWorkbook.Sheets("Sheet1").Rows("1:2").RowHeight = 10
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,816
Office Version
  1. 2010
Platform
  1. Windows
Suppose A1:B1 are merged and contain wrapped text. Then make column C (or any unused column) the combined width of columns A and B, and in C1, enter =A1 and format to wrap text and use the same font as A1:B1. Then autofit row height.

That works, but my first suggestion would be to try harder to avoid merged cells.
 

Forum statistics

Threads
1,144,388
Messages
5,724,070
Members
422,533
Latest member
garganod1

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
Top