Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default make row height a little bigger in a wrapped cell

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default make row height a little bigger in a wrapped cell

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default make row height a little bigger in a wrapped cell

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default make row height a little bigger in a wrapped cell

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
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
Row height not auto adjusting on wrapped cells (Excel '07) Dave Excel Discussion (Misc queries) 2 August 5th 09 10:37 PM
How can I set the row height to adjust to fit wrapped text chasinamie Excel Discussion (Misc queries) 4 October 29th 08 09:16 PM
Help with Auto Row Height with wrapped text mlong Excel Discussion (Misc queries) 1 August 7th 08 11:14 PM
Row height to auto-adjust for wrapped text CW Excel Discussion (Misc queries) 4 December 20th 06 05:00 PM
Autofit didn't work to adjust row height to fit wrapped contents nwacct Excel Discussion (Misc queries) 4 May 31st 06 10:13 PM


All times are GMT +1. The time now is 08:34 AM.

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"