Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Autofit merged cells with wrapped text

Jim Rech wrote a macro called AutoFitMergedCellRowHeight that you may like:
http://groups.google.com/groups?thre...%40tkmsftngp05

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ivan wrote:

Hi,

I have a cell, which is merged from more cells. I have a text within this cell, which is wider than width of this cell (merged cells). The text wrap flag is set, so text is wrapping and have more than one row (only first is visible). I need to autofit this cell (row) as single-cell does, when the text is wider and text wrap flag is set. Or I'd like to get the number of the rows of the text.

Thanks for any help.


--

Dave Peterson

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autofit merged cells with wrapped text

That worked well but I have a whole spreadsheet that I want to be able to
adjust rather than just individual cells. Is there a macro that will enable
me to apply this to an entire worksheet or at least a section of selected
rows?

Thank you!



"Dave Peterson" wrote:

Jim Rech wrote a macro called AutoFitMergedCellRowHeight that you may like:
http://groups.google.com/groups?thre...%40tkmsftngp05

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ivan wrote:

Hi,

I have a cell, which is merged from more cells. I have a text within this cell, which is wider than width of this cell (merged cells). The text wrap flag is set, so text is wrapping and have more than one row (only first is visible). I need to autofit this cell (row) as single-cell does, when the text is wider and text wrap flag is set. Or I'd like to get the number of the rows of the text.

Thanks for any help.


--

Dave Peterson


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Autofit merged cells with wrapped text

You could select your cells that you want fixed and then run the macro against
each of those cells:

Kind of:

Option Explicit
Sub doTheSelection()
Dim myCell As Range
Dim myRng As Range
Set myRng = Selection
For Each myCell In myRng.Cells
myCell.Select
Call AutoFitMergedCellRowHeight
Next myCell
End Sub

(with Jim's original code here!)

Mere wrote:

That worked well but I have a whole spreadsheet that I want to be able to
adjust rather than just individual cells. Is there a macro that will enable
me to apply this to an entire worksheet or at least a section of selected
rows?

Thank you!


"Dave Peterson" wrote:

Jim Rech wrote a macro called AutoFitMergedCellRowHeight that you may like:
http://groups.google.com/groups?thre...%40tkmsftngp05

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ivan wrote:

Hi,

I have a cell, which is merged from more cells. I have a text within this cell, which is wider than width of this cell (merged cells). The text wrap flag is set, so text is wrapping and have more than one row (only first is visible). I need to autofit this cell (row) as single-cell does, when the text is wider and text wrap flag is set. Or I'd like to get the number of the rows of the text.

Thanks for any help.


--

Dave Peterson



--

Dave Peterson
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
Auto Row Height with Wrapped Text in Merged Cells Problem Rick Cl. Excel Discussion (Misc queries) 3 June 3rd 10 11:21 PM
Merged Cells and Wrapped Text Kathy Excel Discussion (Misc queries) 0 January 17th 08 05:55 PM
Excel - Automate row width for merged cells with wrapped text Sweetiedaw Setting up and Configuration of Excel 0 September 7th 06 10:23 PM
How do I get all text to print in merged and wrapped cells. 10-S-C Excel Discussion (Misc queries) 2 December 4th 05 03:10 PM
Autofit merged cells with wrapped text Ivan Excel Programming 0 June 23rd 04 02:33 PM


All times are GMT +1. The time now is 04:36 PM.

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

About Us

"It's about Microsoft Excel"