Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Row Height with Wrapped Text in Merged Cells Problem | Excel Discussion (Misc queries) | |||
Merged Cells and Wrapped Text | Excel Discussion (Misc queries) | |||
Excel - Automate row width for merged cells with wrapped text | Setting up and Configuration of Excel | |||
How do I get all text to print in merged and wrapped cells. | Excel Discussion (Misc queries) | |||
Autofit merged cells with wrapped text | Excel Programming |