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

I'm trying to insert an arbitrary multiline comment string into an XLS
row and have bumped into a catch-22.

I originally tried merging a bunch of cells (all the defined columns in
the sheet for the row in question) and sticking the text into the first
of them. The point is that I don't know how wide the text is, and I
only want it to wrap where there are explicit newline characters.

This 'works', in the sense that the text appears in the cell and wraps
at the newlines. But I can't get Excel to auto-fit the row size to the
text. Even when I click 'format cells', I don't get the alignment tab
that would allow me to view the 'wrap text' option. If I manually
resize the row, the wrapping text displays fine.

So I tried it without the cell merge. Now it sizes the row to display
all the text, but it wraps to the single cell width, which means it
wraps to more lines than requested by the newlines.

I also tried cell merge without 'wrap text'. In that case, it just
ignores the newlines (displays them as 'bad character' glyphs).

So, is it possible to insert a big chunk of wrapping text into a big row
and get Excel to size the row so all the text displays?

Thanks,
Rob
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Wrapping multiline text in merged cells

Row Autofit will not work with merged cells unless you add event code to
your worksheet.

If you want to go that route...............

See google search thread for code by Greg Wilson. Watch out for word wrap
in the URL which is all one line.

http://groups.google.com/group/micro...1c160cbeb27874


Gord Dibben MS Excel MVP


On Mon, 19 Jan 2009 12:44:13 -0500, Rob Y wrote:

I'm trying to insert an arbitrary multiline comment string into an XLS
row and have bumped into a catch-22.

I originally tried merging a bunch of cells (all the defined columns in
the sheet for the row in question) and sticking the text into the first
of them. The point is that I don't know how wide the text is, and I
only want it to wrap where there are explicit newline characters.

This 'works', in the sense that the text appears in the cell and wraps
at the newlines. But I can't get Excel to auto-fit the row size to the
text. Even when I click 'format cells', I don't get the alignment tab
that would allow me to view the 'wrap text' option. If I manually
resize the row, the wrapping text displays fine.

So I tried it without the cell merge. Now it sizes the row to display
all the text, but it wraps to the single cell width, which means it
wraps to more lines than requested by the newlines.

I also tried cell merge without 'wrap text'. In that case, it just
ignores the newlines (displays them as 'bad character' glyphs).

So, is it possible to insert a big chunk of wrapping text into a big row
and get Excel to size the row so all the text displays?

Thanks,
Rob


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
Wrapping Text in Merged Cells brigla5 Excel Worksheet Functions 4 October 18th 09 03:28 AM
Wrapping text in merged cells JRTB Excel Discussion (Misc queries) 4 January 24th 09 08:21 AM
wrapping text in merged cells Ann Excel Discussion (Misc queries) 2 April 3rd 08 04:51 PM
Wrapping text in merged cells Taza Excel Discussion (Misc queries) 3 January 16th 07 08:56 AM
merged cells and wrapping text Rod[_2_] Excel Programming 4 November 4th 04 06:59 AM


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