make row height a little bigger in a wrapped cell

D

Diane

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.
 
D

Dave Peterson

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 here:
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.)
 
D

Diane

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.
 
D

Diane

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top