Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default wrap text in merge cells

I wanted to have my cell to wrap text in merge cells.

I tried to select wrap text without merge cells then it works. It does
not warp text when cells are merged.

Any way, to wrap text in merge cells?

Your information is great appreciated,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default wrap text in merge cells

inungh used his keyboard to write :
I wanted to have my cell to wrap text in merge cells.

I tried to select wrap text without merge cells then it works. It does
not warp text when cells are merged.

Any way, to wrap text in merge cells?

Your information is great appreciated,


Try...
Merge first, then wrap all merged cells. Alternatively, wrap all cells
to be merged, then merge wrapped cells.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default wrap text in merge cells

Merged cells DO allow wrap text.

What doesn't work with merged cells is row autofit.

You need event code to autofit the wrapped text in merged cells.

See google search thread for code by Greg Wilson.

http://tinyurl.com/27qe7ql


Gord Dibben MS Excel MVP

On Wed, 05 Jan 2011 12:14:16 -0500, GS wrote:

inungh used his keyboard to write :
I wanted to have my cell to wrap text in merge cells.

I tried to select wrap text without merge cells then it works. It does
not warp text when cells are merged.

Any way, to wrap text in merge cells?

Your information is great appreciated,


Try...
Merge first, then wrap all merged cells. Alternatively, wrap all cells
to be merged, then merge wrapped cells.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default wrap text in merge cells

Gord Dibben laid this down on his screen :
Merged cells DO allow wrap text.

What doesn't work with merged cells is row autofit.

You need event code to autofit the wrapped text in merged cells.

See google search thread for code by Greg Wilson.

http://tinyurl.com/27qe7ql


Gord Dibben MS Excel MVP

On Wed, 05 Jan 2011 12:14:16 -0500, GS wrote:

inungh used his keyboard to write :
I wanted to have my cell to wrap text in merge cells.

I tried to select wrap text without merge cells then it works. It does
not warp text when cells are merged.

Any way, to wrap text in merge cells?

Your information is great appreciated,


Try...
Merge first, then wrap all merged cells. Alternatively, wrap all cells
to be merged, then merge wrapped cells.


Also true! Perhaps the OP should have been more clear about whether it
was an autofit issue or a wrap text issue.

What I'd like to know is if there's any way to programmatically
determine the number of lines of text in a wrapped cell.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default wrap text in merge cells

My experience has been that most who ask this question believe wrap text is not
enabled because the row won't autofit to show all text due to the cell merging.

Number of lines in a wrap text cell?

See discussion and code from Rick Rothstein.

http://tinyurl.com/273ydra


Gord

On Wed, 05 Jan 2011 12:50:38 -0500, GS wrote:

Also true! Perhaps the OP should have been more clear about whether it
was an autofit issue or a wrap text issue.

What I'd like to know is if there's any way to programmatically
determine the number of lines of text in a wrapped cell.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default wrap text in merge cells

Gord Dibben submitted this idea :
My experience has been that most who ask this question believe wrap text is
not enabled because the row won't autofit to show all text due to the cell
merging.

Number of lines in a wrap text cell?

See discussion and code from Rick Rothstein.

http://tinyurl.com/273ydra


Gord


Thanks, Gord! That's a really good solution...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Merged cells DO allow wrap text.

Hi Gord

I have implemented this code in the Worksheet_Change Event and it works well. I have added an initial unprotect command and a terminating protect command:

ActiveSheet.Protect UserInterfaceOnly:=True, DrawingObjects:=False, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True, AllowFiltering _
:=True

However, upon hitting the 'Delete' key, I get the message
"The cell or chart you are trying to change is protected and therefore read-only.
To modify a protected cell or chart, first remove protection........"

Essentially, after text is entered into any cell, it sets the locked check box to half-greyed somehow.

This means that users can no longer select multiple cells and hit delete in order to clear contents.

Can you see a way round this?

Many thanks!


Submitted via EggHeadCafe
Entity Framework Code-First Library CTP 5 Quick Facts
http://www.eggheadcafe.com/tutorials...ick-facts.aspx
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default Merged cells DO allow wrap text.

Can I see a way around this?

Yes. Don't protect the sheet.

The posted line you added to Greg's code does nothing but unprotect the sheet
when you enter something in any unlocked merged cell.

After entry, the code runs to autofit that row then re-protects the sheet which
locks all cells that you have chosen to be locked.

Don't know where you inserted the line or why you think you can select multiple
locked cells and clear contents on a protected sheet.

If you want to email me the workbook with a description of what you need, I'll
have a look at it.

change phnorton to gorddibb


Gord

On Tue, 11 Jan 2011 11:02:34 GMT, Mark Winspear wrote:

Hi Gord

I have implemented this code in the Worksheet_Change Event and it works well. I have added an initial unprotect command and a terminating protect command:

ActiveSheet.Protect UserInterfaceOnly:=True, DrawingObjects:=False, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True, AllowFiltering _
:=True

However, upon hitting the 'Delete' key, I get the message
"The cell or chart you are trying to change is protected and therefore read-only.
To modify a protected cell or chart, first remove protection........"

Essentially, after text is entered into any cell, it sets the locked check box to half-greyed somehow.

This means that users can no longer select multiple cells and hit delete in order to clear contents.

Can you see a way round this?

Many thanks!


Submitted via EggHeadCafe
Entity Framework Code-First Library CTP 5 Quick Facts
http://www.eggheadcafe.com/tutorials...ick-facts.aspx

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 code with merge cells Damian Excel Programming 0 August 27th 09 05:41 PM
Wrap Text with merge cells code Damian Excel Discussion (Misc queries) 0 August 25th 09 05:13 PM
text outside merge cells despite clicking wrap text chedd via OfficeKB.com Excel Worksheet Functions 5 July 17th 08 09:01 PM
Can't Wrap text in the Merge Cells Winnie Excel Discussion (Misc queries) 13 November 14th 06 07:42 PM
Wrap text, Merge cells ufo_pilot Excel Discussion (Misc queries) 2 August 18th 05 02:16 AM


All times are GMT +1. The time now is 05:56 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"