ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   AUTO INSERT PAGE BREAK FOR EACH COPIED HEADING (https://www.excelbanter.com/excel-discussion-misc-queries/61302-auto-insert-page-break-each-copied-heading.html)

wil4d

AUTO INSERT PAGE BREAK FOR EACH COPIED HEADING
 
I have a Macro that hides and copies visible cells to worksheet 3, but, I
have a certain row (the heading description for the next page) that needs to
wait till the next page break befor copying so that I don't have to manually
adjust them. Moving them manually takes 25 minutes 2-3 times a day, if there
is a way it would really save me.



Gord Dibben

AUTO INSERT PAGE BREAK FOR EACH COPIED HEADING
 
Not clear from your description what needs doing.

Is the heading description the same for each page or is it different on each
page?

Post your code and maybe we can figure out where to place a pagebreak command.


Gord Dibben Excel MVP

On Tue, 20 Dec 2005 15:10:03 -0800, "wil4d"
wrote:

I have a Macro that hides and copies visible cells to worksheet 3, but, I
have a certain row (the heading description for the next page) that needs to
wait till the next page break befor copying so that I don't have to manually
adjust them. Moving them manually takes 25 minutes 2-3 times a day, if there
is a way it would really save me.


wil4d

AUTO INSERT PAGE BREAK FOR EACH COPIED HEADING
 
The heading is different for every page

"Gord Dibben" wrote:

Not clear from your description what needs doing.

Is the heading description the same for each page or is it different on each
page?

Post your code and maybe we can figure out where to place a pagebreak command.


Gord Dibben Excel MVP

On Tue, 20 Dec 2005 15:10:03 -0800, "wil4d"
wrote:

I have a Macro that hides and copies visible cells to worksheet 3, but, I
have a certain row (the heading description for the next page) that needs to
wait till the next page break befor copying so that I don't have to manually
adjust them. Moving them manually takes 25 minutes 2-3 times a day, if there
is a way it would really save me.



Gord Dibben

AUTO INSERT PAGE BREAK FOR EACH COPIED HEADING
 

And where do these headings come from?

When in the code sequence do they get copied?

Post your code.


Gord

On Tue, 20 Dec 2005 16:20:02 -0800, "wil4d"
wrote:

The heading is different for every page

"Gord Dibben" wrote:

Not clear from your description what needs doing.

Is the heading description the same for each page or is it different on each
page?

Post your code and maybe we can figure out where to place a pagebreak command.


Gord Dibben Excel MVP

On Tue, 20 Dec 2005 15:10:03 -0800, "wil4d"
wrote:

I have a Macro that hides and copies visible cells to worksheet 3, but, I
have a certain row (the heading description for the next page) that needs to
wait till the next page break befor copying so that I don't have to manually
adjust them. Moving them manually takes 25 minutes 2-3 times a day, if there
is a way it would really save me.



wil4d

AUTO INSERT PAGE BREAK FOR EACH COPIED HEADING
 
I have been trying to make a template for bidding home restoration.

The bid needs to have two lists of work descriptions with quantities and
prices.

Then any rows with quantities left with zero will be hidden in each list
independently of each other.

There is a diagram and room name at the top of each page.

The problem I am having with the lists being on the same worksheet is when I
hide the rows with zero values on one side it hides the other side.

I have put the lists on separate worksheets and then run these two macros
which hides then copies to worksheet3.

I then manually adjust the lists to get them lined up and move page breaks.

I would really like to have two ranges on the same page.

Either way, I need an auto adjusting page break, or maybe a way to auto line
up the room headings.

Thanks, Wil

Sub HideWD()
Dim rn As Range
Dim rng As Range
Set rng = Range("F11:F900") '<<
For Each rn In rng.Cells '<<
If (rn.Value = 0 And rn.Value < "") Then
Rows(rn.Row).Hidden = True
End If
Next
ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisib le).copy _
Destination:=Sheet3.Range("A1")

End Sub

Sub HideR()
Dim rn As Range
Dim rng As Range
Set rng = Range("F11:F900") '<<
For Each rn In rng.Cells '<<
If (rn.Value = 0 And rn.Value < "") Then
Rows(rn.Row).Hidden = True
End If
Next
ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisib le).copy _
Destination:=Sheet3.Range("H1")
End Sub


"Gord Dibben" wrote:


And where do these headings come from?

When in the code sequence do they get copied?

Post your code.


Gord

On Tue, 20 Dec 2005 16:20:02 -0800, "wil4d"
wrote:

The heading is different for every page

"Gord Dibben" wrote:

Not clear from your description what needs doing.

Is the heading description the same for each page or is it different on each
page?

Post your code and maybe we can figure out where to place a pagebreak command.


Gord Dibben Excel MVP

On Tue, 20 Dec 2005 15:10:03 -0800, "wil4d"
wrote:

I have a Macro that hides and copies visible cells to worksheet 3, but, I
have a certain row (the heading description for the next page) that needs to
wait till the next page break befor copying so that I don't have to manually
adjust them. Moving them manually takes 25 minutes 2-3 times a day, if there
is a way it would really save me.





All times are GMT +1. The time now is 12:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com