+ Reply to Thread
Results 1 to 4 of 4

Hiding Columns/Rows for printing, also a header question

  1. #1
    CEN7272 - ExcelForums.com
    Guest

    Hiding Columns/Rows for printing, also a header question

    I have a list with about 8 columns and 300 rows. Normally this sheet
    is viewded on a computer but sometimes it may need to be printed. I
    want to print all the rows but only 6 of the columns. because the
    sheet is viewed/printed by several users, I would like to do this
    without having to hide the columns everytime it is printed. Is there
    a way to select specific rows/colums so that they are viewable but not
    printable?

    Also, at the top of the list I have a key (5R x 6C) which is frozen so
    that it can be used for the entire sheet. Is it possible to have this
    printed at the top of each page (as a header)

    I'd appreciate any help for either question.
    Clay
    ---------
    www.coffeecozy.com

    Use your Bodum and give up cold coffee for good!

  2. #2
    JulieD
    Guest

    Re: Hiding Columns/Rows for printing, also a header question

    Hi Clay

    re Q1: no, you can't nominate columns as viewable but not printable, however
    you can make it easier for the columns to be hidden or the document printed
    - option 1 - if the columns that you don't want printed are next to each
    other, select the columns and choose data / group and outline / group ...
    now when they need to be hidden click on the little - and they will be
    hidden, when you want them back again click on the + and they will appear
    - option 2 - create two custom views - an "on-screen" one and a "print" one
    ... .to create the "on-screen" one, leave all the columns unhidden and choose
    view / custom views / add - give it a name and click Ok. To create the
    "print" one, hide the relevant columns, chose view / custom views / add -
    give it a name, ensure both check boxes are checked, click OK. You can then
    record a macro displaying the print one and another macro dispalying the one
    screen one - and create toolbar buttons to switch between the two different
    views

    re Q2: to set rows to repeat at the top of every printed page, choose file /
    page setup / sheet tab, click in rows to repeat at top, then click on the
    row numbers for what you want repeated and then click Ok

    hope this helps, please post back if you require more details

    Cheers
    JulieD



    "CEN7272 - ExcelForums.com" <[email protected]> wrote
    in message news:[email protected]...
    >I have a list with about 8 columns and 300 rows. Normally this sheet
    > is viewded on a computer but sometimes it may need to be printed. I
    > want to print all the rows but only 6 of the columns. because the
    > sheet is viewed/printed by several users, I would like to do this
    > without having to hide the columns everytime it is printed. Is there
    > a way to select specific rows/colums so that they are viewable but not
    > printable?
    >
    > Also, at the top of the list I have a key (5R x 6C) which is frozen so
    > that it can be used for the entire sheet. Is it possible to have this
    > printed at the top of each page (as a header)
    >
    > I'd appreciate any help for either question.
    > Clay
    > ---------
    > www.coffeecozy.com
    >
    > Use your Bodum and give up cold coffee for good!




  3. #3
    JE McGimpsey
    Guest

    Re: Hiding Columns/Rows for printing, also a header question

    One way, using an event macro.

    Put this in the ThisWorkbook code module. Change the Sheet name and
    columns to suit:


    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Dim ws As Worksheet
    Application.EnableEvents = False
    For Each ws In ActiveWindow.SelectedSheets
    If ws.Name = "Sheet1" Then
    ws.Range("F:F", "J:J").EntireColumn.Hidden = True
    ws.PrintOut
    ws.Range("A:K").EntireColumn.Hidden = False
    Else
    ws.PrintOut
    End If
    Next ws
    Application.EnableEvents = True
    End Sub

    In article <[email protected]>,
    [email protected]lid (CEN7272 - ExcelForums.com)
    wrote:

    > I have a list with about 8 columns and 300 rows. Normally this sheet
    > is viewded on a computer but sometimes it may need to be printed. I
    > want to print all the rows but only 6 of the columns. because the
    > sheet is viewed/printed by several users, I would like to do this
    > without having to hide the columns everytime it is printed. Is there
    > a way to select specific rows/colums so that they are viewable but not
    > printable?
    >


  4. #4
    CEN7272 - ExcelForums.com
    Guest

    Re: Hiding Columns/Rows for printing, also a header questio

    Thanks to both of you, the VB code worked perfectly and the
    suggestion for printing the key on all pages was exactly what I was
    looking for. Also, thanks for the speedy reply
    Clay
    ---------
    www.coffeecozy.com

    Use your Bodum and give up cold coffee for good!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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