Hide repeating row 1

  • Thread starter Thread starter peterb
  • Start date Start date
P

peterb

i have a three page worksheet. I only need row 1 repeating on the first two
pages. Is there a way to hide row 1 on the 3rd page?
 
There is no way (through Menus) provided by Excel... You may achieve this
through VBA code but then you can almost anything through that route...
 
For when you print?

If yes, then you could use a macro that prints page 1 and 2 the way you like.
Then removes the rows to repeat at top and prints page 3.

You could even record a macro while you do it manually to get you started.
 
Yes, when I print.
--
peterb


Dave Peterson said:
For when you print?

If yes, then you could use a macro that prints page 1 and 2 the way you like.
Then removes the rows to repeat at top and prints page 3.

You could even record a macro while you do it manually to get you started.
 
Sub Some_Titles()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
ActiveSheet.PrintOut From:=1, To:=2
.PrintTitleRows = ""
ActiveSheet.PrintOut From:=3, To:=TotPages
End With
End Sub

Thanks to Ron de Bruin for the nuts and bolts.


Gord Dibben MS Excel MVP
 
If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to Tool>Macro>Macros.

You can also assign this macro to a button or a shortcut key combo.


Gord
 
Back
Top