View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
Rod[_2_] Rod[_2_] is offline
external usenet poster
 
Posts: 19
Default merged cells and wrapping text

thanks
but this only works because you have gone down to row 4.
I don't know how much text will be in cell a1 so I just want it to increase
the row height to accommodate the text in the same way Wrap works for a
single unmerged cell.

the problem is the same even if done manually without code.
As far as I can see there is no way of measuring how many lines the text
should flow onto and adjusting the row height by code either



"Alasdair Stirling" wrote in
message ...
Try the following code:

Sub alpha()
With Range("a1:b4")
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = True
.MergeCells = True
End With
End Sub

Regards,

Alasdair Stirling

"Rod" wrote:

I have merged a few adjacent cells in a row, then asked Excel to wrap

the
text with the merged cell. It refuses.

I was originally trying to do this in code, but I now find that it can't

be
done even when I try and do it manually.
(Using Office XP)


Anyone know a work-around?

cheers


Rod