Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I've got a sheet with columns at work
date text (sometimes multi-line wrapped) $ nnnn.nn I can wrap text no problem but I hope approximate double spacing so I don't have to put a blank row between each item. I need the space between items so the text isn't squashed all together for a court form I guess I want to be able to say height of cell necessary for the wrapped text however much it might be plus n for each row height. I can't find a way. Is it possible? Excel 2002 Win xp Thanks for your help. |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
If you're using merged cells, then this won't work.
But you could autofit the rowheight for all the cells--then add a little bit to each of the row heights. This kind of macro should work ok: Option Explicit Sub testme() Dim iRow As Long Dim wks As Worksheet Dim ALittleBit As Double ALittleBit = 3 Set wks = ActiveSheet With wks.UsedRange .Rows.AutoFit For iRow = 1 To .Rows.Count .Rows(iRow).RowHeight = .Rows(iRow).RowHeight + ALittleBit Next iRow End With End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Diane wrote: I've got a sheet with columns at work date text (sometimes multi-line wrapped) $ nnnn.nn I can wrap text no problem but I hope approximate double spacing so I don't have to put a blank row between each item. I need the space between items so the text isn't squashed all together for a court form I guess I want to be able to say height of cell necessary for the wrapped text however much it might be plus n for each row height. I can't find a way. Is it possible? Excel 2002 Win xp Thanks for your help. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Thanks so much. No merged cells, they just seem to cause trouble for
me. I'll try this macro tomorrow at work and let you know. Thanks again for the response and the macro and links. On Nov 15, 4:55*pm, Dave Peterson wrote: If you're using merged cells, then this won't work. But you could autofit the rowheight for all the cells--then add a little bit to each of the row heights. This kind of macro should work ok: Option Explicit Sub testme() * * Dim iRow As Long * * Dim wks As Worksheet * * Dim ALittleBit As Double * * ALittleBit = 3 * * Set wks = ActiveSheet * * With wks.UsedRange * * * * .Rows.AutoFit * * * * For iRow = 1 To .Rows.Count * * * * * * .Rows(iRow).RowHeight = .Rows(iRow).RowHeight + ALittleBit * * * * Next iRow * * End With End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros hehttp://www.contextures.com/xlvba01.html David McRitchie has an intro to macros:http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros:http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Diane wrote: I've got a sheet with columns at work date * * text (sometimes multi-line wrapped) * * *$ nnnn.nn I can wrap text no problem but I hope approximate double spacing so I don't have to put a blank row between each item. *I need the space between items so the text isn't squashed all together for a court form I guess I want to be able to say height of cell necessary for the wrapped text however much it might be plus n for each row height. I can't find a way. Is it possible? Excel 2002 Win xp Thanks for your help. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Thanks again. It worked well after I adjusted a few things a little.
I'll be learning by taking this apart when I get a moment. Diane On Nov 15, 8:56*pm, Diane wrote: Thanks so much. *No merged cells, they just seem to cause trouble for me. I'll try this macro tomorrow at work and let you know. *Thanks again for the response and the macro and links. On Nov 15, 4:55*pm, Dave Peterson wrote: If you're using merged cells, then this won't work. But you could autofit the rowheight for all the cells--then add a little bit to each of the row heights. This kind of macro should work ok: Option Explicit Sub testme() * * Dim iRow As Long * * Dim wks As Worksheet * * Dim ALittleBit As Double * * ALittleBit = 3 * * Set wks = ActiveSheet * * With wks.UsedRange * * * * .Rows.AutoFit * * * * For iRow = 1 To .Rows.Count * * * * * * .Rows(iRow).RowHeight = .Rows(iRow).RowHeight + ALittleBit * * * * Next iRow * * End With End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros hehttp://www.contextures.com/xlvba01.html David McRitchie has an intro to macros:http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros:http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Diane wrote: I've got a sheet with columns at work date * * text (sometimes multi-line wrapped) * * *$ nnnn.nn I can wrap text no problem but I hope approximate double spacing so I don't have to put a blank row between each item. *I need the space between items so the text isn't squashed all together for a court form I guess I want to be able to say height of cell necessary for the wrapped text however much it might be plus n for each row height. I can't find a way. Is it possible? Excel 2002 Win xp Thanks for your help. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Row height not auto adjusting on wrapped cells (Excel '07) | Excel Discussion (Misc queries) | |||
How can I set the row height to adjust to fit wrapped text | Excel Discussion (Misc queries) | |||
Help with Auto Row Height with wrapped text | Excel Discussion (Misc queries) | |||
Row height to auto-adjust for wrapped text | Excel Discussion (Misc queries) | |||
Autofit didn't work to adjust row height to fit wrapped contents | Excel Discussion (Misc queries) |