Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dan B
 
Posts: n/a
Default Automatically enter page breaks?

Hi All,

I have a report that has a few rows of data under each customer in column A.
I want each customers data to be on a separate page. Is there a way to
automatically insert a page break at each customer name in columns A?

Thanks,

Dan


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default Automatically enter page breaks?

Dan

Sub Insert_Pbreak()
Dim OldVal As String
Dim Rng As Range
OldVal = Range("A1")
For Each Rng In Range("A1:A300") '<< change range
If Rng.text < OldVal Then
Rng.PageBreak = xlPageBreakManual
OldVal = Rng.text
End If
Next Rng
End Sub


Gord Dibben MS Excel MVP

On Tue, 9 May 2006 12:57:40 -0600, "Dan B" wrote:

Hi All,

I have a report that has a few rows of data under each customer in column A.
I want each customers data to be on a separate page. Is there a way to
automatically insert a page break at each customer name in columns A?

Thanks,

Dan


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dan B
 
Posts: n/a
Default Automatically enter page breaks?

Thank You!!!!


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Dan

Sub Insert_Pbreak()
Dim OldVal As String
Dim Rng As Range
OldVal = Range("A1")
For Each Rng In Range("A1:A300") '<< change range
If Rng.text < OldVal Then
Rng.PageBreak = xlPageBreakManual
OldVal = Rng.text
End If
Next Rng
End Sub


Gord Dibben MS Excel MVP

On Tue, 9 May 2006 12:57:40 -0600, "Dan B" wrote:

Hi All,

I have a report that has a few rows of data under each customer in column
A.
I want each customers data to be on a separate page. Is there a way to
automatically insert a page break at each customer name in columns A?

Thanks,

Dan




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
evenly spaced page breaks sorrywm Excel Discussion (Misc queries) 2 December 15th 05 12:25 AM
Inserting Page Breaks chrisnelsonusa1 Excel Discussion (Misc queries) 3 December 9th 05 09:34 PM
Problem with Page Numbering Aurora Excel Discussion (Misc queries) 0 November 21st 05 02:10 PM
Page Numbers Aurora Excel Discussion (Misc queries) 0 November 17th 05 08:04 PM
can't drag page breaks S. H. Drew Excel Discussion (Misc queries) 3 May 2nd 05 07:38 PM


All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"