Thread: Copying Formats
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
JoeSpareBedroom JoeSpareBedroom is offline
external usenet poster
 
Posts: 87
Default Copying Formats

I know just enough about macros to get in trouble, so I'll try this on an
experimental sheet first. Attach this to a button, maybe, and click to my
heart's content?


"Dave Peterson" wrote in message
...
Just the rowheights?

You could use a macro:

Option Explicit
Sub testme()
Dim iRow As Long
With Worksheets("sheet1")
For iRow = 6 To .Cells.SpecialCells(xlCellTypeLastCell).Row
.Rows(iRow).RowHeight = .Rows(((iRow - 1) Mod 5) + 1).RowHeight
Next iRow
End With
End Sub

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

JoeSpareBedroom wrote:

I know how to use the paste special / format command for things like
fonts,
alignment, number formats, etc. But, I've got a sheet whose first 5 rows
have had their heights changed in various ways. I need to continue this
formatting down the page. (Row 1 height =20, Row 2 height = 40, for
instance). In other words, each batch of 5 rows needs to have heights
like
the first 5 rows.

Any easy way to do this?


--

Dave Peterson