Automatic height adjustment of merged cells across worksheet

Clair2004

New Member
Joined
Jan 23, 2019
Messages
5
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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,869
Messages
6,122,012
Members
449,060
Latest member
LinusJE

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