Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
coditional Page Break
Hi
I have a problem where i need to use automated page breaks on excel. I'd like a page break each time the word "accounting" appears in Column A. To make my problem even harder for me is that there are blank cells in Column A. I know VGA code will be needed but cannot do this myself. Please help |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
coditional Page Break
Hi,
Try this http://www.mvps.org/dmcritchie/excel/pagebrks.htm -- _______________________ Click "Yes" if it helps ________ Thanks Suleman Peerzade "j4m3sc" wrote: Hi I have a problem where i need to use automated page breaks on excel. I'd like a page break each time the word "accounting" appears in Column A. To make my problem even harder for me is that there are blank cells in Column A. I know VGA code will be needed but cannot do this myself. Please help |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
coditional Page Break
Sub Insert_PBreak_Col()
Dim rng As Range Dim Cell As Range Set rng = Intersect(ActiveSheet.UsedRange, Columns(1)) For Each Cell In rng If Cell.Text = "accounting" Then Cell.Offset(1, 1).PageBreak = xlPageBreakManual End If Next End Sub Will insert a pagebreak below the word "accounting" If you want it above, change the line Cell.Offset(1, 1).PageBreak = xlPageBreakManual to Cell.PageBreak = xlPageBreakManual Gord Dibben MS Excel MVP On Mon, 2 Feb 2009 05:02:03 -0800, j4m3sc wrote: Hi I have a problem where i need to use automated page breaks on excel. I'd like a page break each time the word "accounting" appears in Column A. To make my problem even harder for me is that there are blank cells in Column A. I know VGA code will be needed but cannot do this myself. Please help |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
coditional Page Break
Hi,
A non macro approach would be using the Data Subtotal feature. First of all sort column A. Then highlight the range and navigate to Data Subtotal. Provide the relevant inputs and check the box for "Create page breaks" Hope this helps. -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "j4m3sc" wrote in message ... Hi I have a problem where i need to use automated page breaks on excel. I'd like a page break each time the word "accounting" appears in Column A. To make my problem even harder for me is that there are blank cells in Column A. I know VGA code will be needed but cannot do this myself. Please help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
change page number watermark in page break preview | Excel Discussion (Misc queries) | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
Hiding the page number in page break preview background. | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) |