Thanks for your explanation. You just made that über tough. The problem is that although it seems you're just changing the height of your merged cell to be larger, you're actually creating a new merge in order to make the newly merged cell 4 cells high.
In your first illustration, you show two merged cells with address ranges of A1:A2
and A3:A6
. In your second illustration, the addresses are A1:A4
and A5:A8
, respectively.
In order for Excel to "change the height" (I use that phrase loosely) of the original merged cells at address A1:A2
, it actually has to create a new set up merged cells at address range A1:A4
. However, you won't be able to do that because address A3:A6
is already a merged range and these would overlap.
If you were to try to do this manually, you know that you would have to unmerge the lower group, remerge the top group, and the remerge the bottom group.
You could write a macro that, when executed, popped up an input box that asked the number of cells high the merged cell should be. However, your code would then have to analyze your original stack of merged cells and then unmerge and remerge everything programatically to make the change. This is certainly possible, but it could be a real pain (but also a fun challenge :).
I would ask yourself how badly you want to be able to exactly what you're looking for, because it's not exactly natural behavior in Excel.
My original post is below: now obsolete since I now understand what the author is askingIf you just want to change the height of the cells, you can use something like:
Rows("1:1").RowHeight = 27.75
However, I'm confused by your reference to merged cells. Are you just trying to change the height of a cell or are you also trying to merge cells together?