Results 1 to 21 of 21

auto page break around cell range so as not to print a range across 2 pages

Threaded View

  1. #1
    Registered User
    Join Date
    03-10-2015
    Location
    Essex
    MS-Off Ver
    365
    Posts
    20

    auto page break around cell range so as not to print a range across 2 pages

    Hi everyone.

    I have a sheet which I need to print out. Its contents is made up of about 30 different sections which change (by hiding cells with zero in them) so its length can increase or decrease depending on content. Normally the finished sheet prints out over 10 pages or so and so far I have been having to set page breaks manually (in page view) so that it prints correctly. Some of these sections are small enough to fit several on one page so the page break at SubTotal change is no good to me as I'll end up with 30 pages and I don't want to unnecessarily waste paper, save the planet and all that.

    What I need to happen is for page breaks to occur every 27cm unless the proposed break is in the middle of a cell range and in that case should break just before that range (all my ranges start with the word "Range_"blah blah etc). I don't know if its possible to specify distance in cm but the problem with using row numbers is that some of my cells have wrapped text and can be as deep as 3 or 4 rows.

    None of my current sections (at the moment) are over a page long but if they was then obviously they would have to split over 2 pages.

    so in a non VBA language I reckon it'll go something like this:

    insert page break every 27cm
    else, check if in middle of range and if so break before "Range_"
    else, if range is longer than 27cm break at 27cm

    I'd appreciate any help with this as I've been scouring the internet for ages and I can't find anything that works.
    See attached file for rough idea of what I've got to deal with.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA to insert page break after range not in the middle of it
    By lonemascot in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-16-2015, 12:24 PM
  2. Select visible range and add page break after every 20th visible cell
    By tuc47285 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-04-2015, 01:18 AM
  3. [SOLVED] Need to Print Hidden Pages with value in a range
    By groundin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2013, 05:25 PM
  4. Replies: 1
    Last Post: 01-28-2013, 02:14 AM
  5. Print pages depending on range
    By antonywalsh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-03-2012, 12:30 PM
  6. Code to select a range and set it as the print range onto one page
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2011, 03:37 PM
  7. [SOLVED] Can you get the range reference for each page in a worksheet print range?
    By Crosby in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2005, 02:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1