Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2007 - Page Break on Cell Change

Status
Not open for further replies.

jeffm777

IS-IT--Management
Nov 10, 2009
108
US
Is there any way to insert a page break when the data in cell A1 changes (except for the header of course)?

This is data being pulled from an ODBC connection to a SQL database and will be run on a monthly basis so when the worksheet is refreshed, I'll need the page breaks to automatically shift accordingly.

I would also like to copy the contents in row 1 to the first row on each subsequent page.

Thanks in advance for any ideas.
 


Hi,

This does not make sense.

WHERE would this 'page break' occur?

Let's suppose that the query returned 100 rows row 1 to tow 100--where would the 'page break' go???

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
In column A, I have employees like AMY, DANIEL, etc. I have the spreadsheet sorted by Column A so I need a page break between employees so each employee has their own page when the spreadsheet is printed. I thought about doing a query on individual worksheets for each employee but was hoping to just do a single query, sort it by column A and insert a page break when the employee name changed.
 


I'd do a query on the unique name and use that list in a loop to query all the data you want, and print.

Or loop thru the full resultset and insert HPageBreaks.

Or us the Data > Subtotal FEATURE (not FUNCTION) to pagebreak on name.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top