+ Reply to Thread
Results 1 to 9 of 9

Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

  1. #1
    Registered User
    Join Date
    09-25-2015
    Location
    Louisiana
    MS-Off Ver
    MS Office 2013
    Posts
    29

    Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    Thanks in advance. I have a trending income statement I created with grouped rows including the detail. When grouped it shows the summary of the income statement.

    Is there a way to set the page to print all one 1 page when the rows are grouped and also everything when rows are ungrouped?

    I currently have headers to repeat at the top and set to print the consolidated view when rows are grouped. However, if trying to print everything ungrouped it prints 300 rows on 1 page which obviously makes for very small font size.

    When setting the page layout to print Width "1 page" and Length "Automatic" it looks great print, but when grouping the rows it then prints 4 pages with only a few lines on each page due to the page breaks.

    Any help would be very appreciated.

    Additionally, if there is way to print a multiple headers if it printing continues on the next page would be excellent. For example, each section of Costs has a header with the detail below it. The rows for each section is grouped. When grouped only the subtotal appears. It would be awesome if the header for each subsection (along with the first few rows at top set to repeat print for the report title/header) could be printed if the detail for that grouping continued to print on the following page appeared first before continuing with the detail for that subsection.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    Press alt and f11 at the same time to open a visual basic window

    If you do not see a list of projects and sheet names then select view and then project explorer.

    Find your project in the list and double click on "this workbook"

    Paste this code in the macro module

    Please Login or Register  to view this content.

    Close the macro module and enjoy.

    NB If your sheet has more than 2000 lines then change the 2000

    I will look at ways to change that.

    BRB
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    Press alt and f11 at the same time to open a visual basic window

    If you do not see a list of projects and sheet names then select view and then project explorer.

    Find your project in the list and double click on "this workbook"

    Paste this code in the macro module

    Please Login or Register  to view this content.

    Close the macro module and enjoy.

  4. #4
    Registered User
    Join Date
    09-25-2015
    Location
    Louisiana
    MS-Off Ver
    MS Office 2013
    Posts
    29

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    Awesome. Works great. Except it works perfect on one sheet of workbook but not on the other. The one that doesn't seem to wanna work probably because of something I'm doing screwing it up will look great if all rows are ungrouped printing 6 pages. However, when grouped it prints 6 pages but with all the page breaks. I don't understand why it works as it should on one tab but not the other right next to it.

    Any thoughts on what I'm doing to mess it up?

  5. #5
    Registered User
    Join Date
    09-25-2015
    Location
    Louisiana
    MS-Off Ver
    MS Office 2013
    Posts
    29

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    I made sure to change all the settings on the one not printing correctly to match the sheet that is printing correctly such as page layout to "Automatic" but to no avail...maybe I'm missing something.

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    Have you inserted manual page breaks?

  7. #7
    Registered User
    Join Date
    09-25-2015
    Location
    Louisiana
    MS-Off Ver
    MS Office 2013
    Posts
    29

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    It prints now but I'm receiving ERROR message Microsoft Visual Basic Run-time error '6' Overflow. Any idea?

    Error Message.PNG

  8. #8
    Registered User
    Join Date
    09-25-2015
    Location
    Louisiana
    MS-Off Ver
    MS Office 2013
    Posts
    29

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    It still prints after I click "End" but I'm confused.

  9. #9
    Registered User
    Join Date
    09-25-2015
    Location
    Louisiana
    MS-Off Ver
    MS Office 2013
    Posts
    29

    Re: Setting Sheet to Print 1 Page When Rows Grouped & Multiple Ungrouped

    There are 2 macros. See pic where 1st one ends and 2nd begins the one you provided.

    Macro_Print.PNG

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 06-25-2015, 07:15 AM
  2. Need VBA Code to Ignore Hidden Rows Page Break (Rows Grouped/Ungrouped)
    By Photosweet2006 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2015, 11:48 AM
  3. Replies: 2
    Last Post: 01-10-2014, 09:30 PM
  4. [SOLVED] Code to execute multiple tasks such as deleting rows, inserting sums, setting print area
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2013, 04:18 PM
  5. Chart previous week data as grouped and current week as ungrouped
    By r_a_c_a_4_u in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2013, 12:55 PM
  6. [SOLVED] How to I set up a sheet to print colums/rows on every page in exce
    By Michelle in forum Excel General
    Replies: 1
    Last Post: 05-12-2005, 08:06 PM
  7. print multiple, separate rows on each page
    By DPixie in forum Excel General
    Replies: 1
    Last Post: 04-21-2005, 02:06 AM

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