Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default merged cells and wrap text

Wen i merge two or more cells i can not get the merged cells to wrap text.
--
Richard
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default merged cells and wrap text

Well it perhaps looks that way but in my sheets the cell does wrap. However
you may need to increase the cell height by hand. What I do notice in my
sheets that if you try to double click the rowheight to automatically set the
height it will go to the default row height.

Good luck

"Richard" wrote:

Wen i merge two or more cells i can not get the merged cells to wrap text.
--
Richard

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default merged cells and wrap text

Thanks
--
Richard


"RudyHuls" wrote:

Well it perhaps looks that way but in my sheets the cell does wrap. However
you may need to increase the cell height by hand. What I do notice in my
sheets that if you try to double click the rowheight to automatically set the
height it will go to the default row height.

Good luck

"Richard" wrote:

Wen i merge two or more cells i can not get the merged cells to wrap text.
--
Richard

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default merged cells and wrap text

Long audible sigh here.................

One more victim of "merged cells".

Wrap Text works fine on merged cells, but Autofit does not work.

You need VBA event code to do that.

Here is code from Greg Wilson.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
Application.ScreenUpdating = True
End If
End With
End Sub

This is event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that sheet module.


Gord Dibben MS Excel MVP

On Tue, 17 Jul 2007 08:12:07 -0700, Richard
wrote:

Wen i merge two or more cells i can not get the merged cells to wrap text.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrap text in merged cells Lena_Office Excel Worksheet Functions 6 March 22nd 07 04:21 AM
text wrap in merged cells SteveFerd Excel Discussion (Misc queries) 3 July 16th 05 12:46 PM
text wrap w/ merged cells Dahlman Excel Discussion (Misc queries) 3 April 18th 05 08:37 PM
Rows with merged cells are not adjusting even w/ Wrap Text and au. mkern20 Excel Discussion (Misc queries) 1 January 4th 05 08:10 PM
How do I "Wrap Text" & "Autofit" within Merged Cells in Excel? 6-shooter Excel Worksheet Functions 3 October 31st 04 12:14 AM


All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"