View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default inserting section breaks in excel

I don't think Excel provides this facility. You can not have section breaks...

Where are your different headers? You need to have a macro which will insert
the appropriate headers at the time of printing...
How will you identify a section break?

For example following macro will insert page breaks when the value in first
column changes...

Sub PageBreak()
Dim CellRange As Range
Dim TestCell As Range

Set CellRange = Selection
For Each TestCell In CellRange
ActiveSheet.Rows(TestCell.Row).PageBreak = xlPageBreakNone
If TestCell.Value < TestCell.Offset(-1, 0).Value Then
ActiveSheet.Rows(TestCell.Row).PageBreak = xlPageBreakManual
End If
Next TestCell
End Sub

To use the macro, simply select the cells you want to use as your key for
doing the splits, minus the top cell. For instance, if the departments are in
column A, rows 2 through 37, you would select the range in A3 through A37.
Run the macro, and any old page breaks are removed and new ones added.
"fiji222" wrote:

I'm trying to figure out how to insert section breaks in my excel spreadsheet
so that I can have different headers for different pages. Everywhere I've
looked says go to insert and click section break. But I don't see this
anywhere on the toolbar. Others also suggest clicking the "link to" button
to allow to have different headers.