Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Excel conditional page breaks

Posted on 2012-03-27
3
374 Views
Last Modified: 2012-07-29
Hi guys, I have a sheet that I need to add page breaks, the range is A4:AG627
If a cell in column CQ is greater than or = 3 then I need to add a page break on those rows
in less than 3 then not page break.

Thank you for your help
0
Comment
Question by:rsen1
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 37775396
0
 

Author Comment

by:rsen1
ID: 37780023
Thank you for your response. The code I am using is below, I'm inserting this to identify the rows I need to page break. I didn't understand the ozgrid example. I have ten critical page breaks and was hoping for a code that would do it without the ten codes.

If Range("CM242") = "" Then
    Range("A242").PageBreak = xlPageBreakNone
   ElseIf Range("CM242") > 0 Then
    Range("A242").Select
    ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
    End If
0
 

Author Closing Comment

by:rsen1
ID: 38236092
Sorry I forgot about htis question.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question