[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 469
  • Last Modified:

Excel conditional page breaks

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
rsen1
Asked:
rsen1
  • 2
1 Solution
 
als315Commented:
0
 
rsen1Author Commented:
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
 
rsen1Author Commented:
Sorry I forgot about htis question.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now