Autofit Row Height of Cells (including merged cells) for Visible Rows Only

AndiJanelle

New Member
Joined
Jan 24, 2019
Messages
4
Hello,

I have a file that contains multiple groupings of merged cells, as well as many cells are not merged.

I need to be able to filter a column and have all of the visible rows auto-fit the height so I can view all the text within (some will be merged and others will not be).

I have found coding that works to autofit the visible cells that are not merged, but cannot find something that will autofit the merged cells, as well.

Any help will be greatly appreciated!

Andi
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hey Fluff,

I tried that but to no avail....I am very new to VBA so it's difficult for me to modify the code provided within to make it work for me.
 
Upvote 0
I have never looked at the code, because I never use merged cells & so have no idea how it works.

If you supplied some more information, such as sheet name, ranges, which column is being filtered, maybe someone else can help.
 
Upvote 0
Okay, I've listed cell references below:

The range of cells A2:A19 are all merged together as one (and there are about 5 lines of text within that group of merged cells).
The range of cells B2:B19 are not merged.
The range of cells C2:C19 are not merged.

How can I filtered for one (or more) cell in column B, and have the corresponding cell(s) in column A auto-fit the height so that all five lines of text are displayed?

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,852
Members
449,096
Latest member
Erald

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