+ Reply to Thread
Results 1 to 4 of 4

Print a worksheet based on value in another cell

  1. #1
    Forum Contributor
    Join Date
    02-27-2007
    Posts
    156

    Print a worksheet based on value in another cell

    In Column C (C11:C28) I have Sheet Names - Descriptors and then in Column D (D11:D28) I have the "YES" or "NO" for whether the sheet should print
    There could be blanks rows or rows with just heading text on them.

    This project uses Table of Contents and to help me clarify what is on the specific sheet I use a Formula [=CONCATENATE("Agenda1 - ",Agenda1!H1)] on some of the Rows. These all then Hyperlink to the appropriate worksheet. Not all Rows will have the Formula if it is easily identifiable.

    The name of the sheet is Either the Name As Is Unless there is a hyphen and if there is a hyphen then the sheet name is the first word up to the space.

    I'm sure this is doable with VBA I just don't know how to manipulate the - out of the names and do the appropriate sheet selections so that I can print all of the selected sheets.

    My current data looks something like this:

    Info Pages Print (Merged Cell Header Row)
    Title YES
    Implementation NO
    <blank row>
    Agendas Print (Another Merged Cell Header Row)
    Agenda1 - FORMULA NAME1 YES
    Agenda2 - FORMULA NAME2 NO
    Agenda3 - FORMULA NAME3 NO
    ... thru Agenda7
    Other Print (Merged Cell Header Row)
    Other1 - Formula Name NO
    Other2 - NO
    Other3 - NO

    My workbook has worksheets with names: Title, Implementation, Agenda1, Agenda2, Agenda3,...Other1, Other2, Other3

    I want to select all of them that have the YES to Print and then send them to my printer.

    Here's hoping you might have a solution for this strange need.

  2. #2
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: Print a worksheet based on value in another cell

    Hi bmasella,

    Please attach your workbook so that we can look at it..

    Regards,
    Joshi
    Cheers,

    Joshi
    Being with a winner makes you a winner

  3. #3
    Forum Contributor
    Join Date
    02-27-2007
    Posts
    156

    Re: Print a worksheet based on value in another cell

    Attahced is an example, not the actual sheet but all positioning remains the same.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-27-2007
    Posts
    156

    Re: Print a worksheet based on value in another cell

    This routine lets me print "specific" sheets to the printer defined in a specific cell. What I'm looking for is a way to determine which sheets to print based on the YES/NO in the worksheet and to get the sheet name from the Agenda - Name rows.

    Please Login or Register  to view this content.

+ 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: 3
    Last Post: 05-26-2014, 02:21 AM
  2. Print worksheet based on cell value to specific printer
    By swiftrain in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2013, 09:57 AM
  3. Need Macro To Sort and Print WorkSheet Based On Values Of Cells
    By NHD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2012, 04:08 AM
  4. HELP - Code to Copy/Format/Save/Print Worksheet Based on Cell Values
    By larzep in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-06-2012, 09:08 PM
  5. macro to print worksheet based on value in range of cells
    By mugs62 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-29-2009, 11:52 PM

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