Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Adding multiple page breaks - at start of each day
Hi all,
I'm hoping to find a simple way to add page breaks in my template to the start of each day, to make it more printer friendly. Originally, I had planned to use =IF(b1b2,"Page",1) command in column D to determine where I wanted the page breaks to be, then use Go to - Constants - Text, to add page breaks on each "Page" cell. However, I only get a page break in the first instance. Day 1 1737 Data 1 Day 1 1752 Data 1 Day 1 1800 Data 1 Day 1 1827 Data 1 Day 1 1830 Data 1 Day 1 1930 Data 1 Day 1 2030 Data 1 Day 1 2230 Data 1 Day 1 2330 Data 1 Day 2 0000 Data Page Day 2 0030 Data 1 Day 2 0100 Data 1 Day 2 0200 Data 1 Day 2 0230 Data 1 Day 2 0300 Data 1 I'm hoping someone here knows a simple way to accomplish this, preferably without resorting to VB scripting, as I am a VB noob. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Adding multiple page breaks - at start of each day
Hate-Excel-Need was thinking very hard :
Hi all, I'm hoping to find a simple way to add page breaks in my template to the start of each day, to make it more printer friendly. Originally, I had planned to use =IF(b1b2,"Page",1) command in column D to determine where I wanted the page breaks to be, then use Go to - Constants - Text, to add page breaks on each "Page" cell. However, I only get a page break in the first instance. Day 1 1737 Data 1 Day 1 1752 Data 1 Day 1 1800 Data 1 Day 1 1827 Data 1 Day 1 1830 Data 1 Day 1 1930 Data 1 Day 1 2030 Data 1 Day 1 2230 Data 1 Day 1 2330 Data 1 Day 2 0000 Data Page Day 2 0030 Data 1 Day 2 0100 Data 1 Day 2 0200 Data 1 Day 2 0230 Data 1 Day 2 0300 Data 1 I'm hoping someone here knows a simple way to accomplish this, preferably without resorting to VB scripting, as I am a VB noob. Have you tried using PageBreak Preview? -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Adding multiple page breaks - at start of each day
Hi,
Am Thu, 19 Apr 2012 06:28:20 +0000 schrieb Hate-Excel-Need: Originally, I had planned to use =IF(b1b2,"Page",1) command in column D to determine where I wanted the page breaks to be, then use Go to - Constants - Text, to add page breaks on each "Page" cell. However, I only get a page break in the first instance. try: Sub PageBreaks() Dim LRow As Long Dim i As Long LRow = Cells(Rows.Count, 1).End(xlUp).Row For i = 1 To LRow If Cells(i + 1, 1) < Cells(i, 1) Then With ActiveSheet .HPageBreaks.Add Range("A" & i + 1) End With End If Next End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#4
|
|||
|
|||
Quote:
But I'm afraid that's mostly ancient greek to me. Any chance you could give me some explanation as to how that works, and how to apply it? Thanks |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Adding multiple page breaks - at start of each day
Hi,
Am Mon, 23 Apr 2012 07:50:05 +0000 schrieb Hate-Excel-Need: But I'm afraid that's mostly ancient greek to me. Any chance you could give me some explanation as to how that works, and how to apply it? press ALT+F11, make a right-click on your project and choose "Insert Modul", copy the code into the code window. Back in Excel you can run the macro. Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 adding page breaks | Excel Discussion (Misc queries) | |||
Excel 2003 adding page breaks | Excel Discussion (Misc queries) | |||
Adding page breaks conditionally | Excel Programming | |||
Multiple Page Breaks | Excel Discussion (Misc queries) | |||
Insert Multiple Page Breaks | Excel Worksheet Functions |