Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim myRng As Range
With Worksheets("Sheet99") 'sheet name changed here 'I'm using columns A:X and the last row in column A Set myRng = .Range("a1:x" & .Cells(.Rows.Count, "A").End(xlUp).Row) .PageSetup.PrintArea = myRng.Address(external:=True) End With There are tons of ways to apply that border formatting. I'd record a macro the way I wanted (border styles, colors, weights, ...) and then apply it the myRng range object. If you need help with that, post back with your recorded code. I'm sure you'll get lots of help. " wrote: Pretty sure this is straight forward but not quite sure which vba function is best for this task but essentially I want to format a sheet of data that has a fixed number of columns but a variable number of rows. Therefore I need a macros that can count the number of populated rows in the first column then to simply apply a grid overlay and set the print area to that last row, any ideas? -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formatting macro help | Excel Discussion (Misc queries) | |||
Formatting using Macro | Excel Discussion (Misc queries) | |||
formatting a macro | Excel Programming | |||
Formatting via a macro | Excel Discussion (Misc queries) | |||
Macro Formatting? Please Help | Excel Programming |