wrap text in merge cells

I

inungh

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,
 
G

GS

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.
 
G

Gord Dibben

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
 
G

GS

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

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.
 
G

Gord Dibben

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
 
G

GS

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...
 
M

Mark Winspear

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/tutorial...work-codefirst-library-ctp-5-quick-facts.aspx
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top