vba - Excel Macro - Dynamically Set Print Area -


I have a table with a fixed column, but the number of rows varies from week to week.

Is there a macro that can automatically set up this table to set up a print area?

combine dynamic resizing designated with a VBA method.

Create a named category first, MyNamedRange: (assuming your table starts with IN $ 1 and you have headers in the table)

  = Offset (A1, 0,0, COUNTA (A: A) -1, COUNTA (1: 1))   

Then just execute a line of VBA:

  ActiveSheet.PageSetup.PrintArea = "MyNamedRange"    

Comments