Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 189
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default 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
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
How do I do page breaks when view menu doesnt page break preview HeatherF55 Excel Discussion (Misc queries) 0 September 21st 07 04:24 AM
change page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:16 AM
change and/or remove page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:15 AM
Hiding the page number in page break preview background. I need coffee, wake me up! Excel Discussion (Misc queries) 0 May 15th 06 10:32 AM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM


All times are GMT +1. The time now is 07:00 AM.

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

About Us

"It's about Microsoft Excel"