Print Multiple Sheets Based On Criteria

Sep 5, 2007

I am trying to find a way to select and print multiple sheets based on a criteria or a list. I have a large worksheet with many sheets. Each sheet falls into one of three categories, and I want to be able to automatically print all tabs in each category. I have all of the sheets rolled up into a summary where I have access to all of the sheet name and print criteria.

View 4 Replies


ADVERTISEMENT

Selecting Sheets Meeting A Criteria For Print Preview

Aug 31, 2006

I have a print userform where I let the user print a summary package of sheets. I am trying to allow the user to see a print preview of certain sheets. The first one is always the "Bid Summary" sheet (sheet 2). The rest are a dynamic number of sheets with numeric names starting at 1. Now I need a easy way for me to allow the user to see a print preview of the Bid Summary, and then all the sheets right afterwards. I cant use sheets("1","2",...).select because it wont select a ever changing number of sheets. Really it is a problem of selecting a varied number of sheets in VB.

View 3 Replies View Related

Print Multiple Ranges From Multiple Sheets Userform

Jun 16, 2007

I inherited a spreadsheet that had an userform where the user checked off which 'pages' he wanted to print. The Ok button routine used if statements to run a routine for each 'page.' Here's an example of the original code for one page:

Sub Button2_Click()
Sheet7.Activate
Run "HorizontalPrintStuff" 'generic landscape pagesetup
With ActiveSheet.PageSetup 'specific pageset settings
.RightFooter = " Construction Assumptions"
.PrintArea = "CONSTRUCTION" 'the named range to print
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1 'this changes depending upon the page selected
End With
ActiveSheet.PrintOut
End Sub

The problem was it printed each page as a separate print job; and if you print to adobe, you get serveral files, not one file. That and it took a long time to run.

So I tried a different tack. If the checkboxes has true, then the printarea is set to that named range. If there were more than one named range on a sheet to be printed, I consolidated them. I did this with a bunch of if statements - very cumbersome.

Sheet3.Activate
'Sheet3.ResetAllPageBreaks 'disabled due to errors
Run "HorizontalPrintStuff" 'generic landscape pagesetup
With ActiveSheet.PageSetup 'specific pageset settings
.PrintArea = "DEVBGTALL" 'the named range to print
.FitToPagesWide = 4 'this changes depending upon the
.FitToPagesTall = 1
End With

I haven't shown all the code cause it goes on for 12 sheets containing 16 different printareas.

My current muck ups are .....

1) it prints every printarea/named range on a given sheet (I took out all the if statements trying to debug everything.) Is there another conditional argument that allows for multiple 'trues'?

2) the pagebreaks in printarea/named ranges that are multiple pages (like a 48 month schedule) won't stay set. I've tried both VPageBreaks(3).Location:= and .VPageBreaks.Add Before:=

3) the Sheet1.select false argument is always adding a random sheet to the end of the print job. Don't know why.

I can do all this in a recorded macro, just not the selection userform. I've thought about copying to another sheet or hiding columns and rows then printing, but that seems just as cumbersome.

To recap, i want to print out, as one print job, multiple printareas from mulitple sheets, based upon checkbox selection on an userform.

View 6 Replies View Related

How To Print Multiple Sheets

Jul 17, 2013

I have 23 sheets out of a much larger number of sheets, all in one workbook. How can I print only the first 23 sheets all at once?

View 6 Replies View Related

Vba To Print Multiple Sheets

Apr 5, 2009

I've been feverishly searching for a pre-existing macro to print specific sheets assigned manually by the macro to the windows default printer (or better still bring up the printer dialog box and you can select which printer!)

The macro is attached to an image on Sheet 3 called "Details"
The respective sheets I want to print in succession are Sheet 2 "Letter Of Estimation", Sheet 6 "Labour & Equipment SOR" and Sheet 7 "Labour Only SOR".

Can anyone help me with this please? I've been searching for a while and come up with various bits of code that perform intricate loops based on user input, and other unrelated tasks I can't seem to ween out of the code by myself.

View 8 Replies View Related

Print Multiple Sheets At Once

Apr 19, 2008

I have a workbook consisting of about 20 worksheets. I have VBA code that prints any sheet that is used but skips any pages that are not used. This works fine but if there are more than one user printing sheets at the same time on our network printer, the pages get all mixed together and they have to pick through the stack to find their pages. Is there a way that the used pages can be assembled and then all printed as one printjob so that each users pages will all print together simplifying the sorting process.

View 9 Replies View Related

How To Select Multiple Sheets And Print Them

Apr 14, 2014

I'm trying to select multiple sheets and print them out. At this time the code is only printing out the "Work Order" sheet. I'm guessing it's something to do with the PrintOut command trying to print the active sheet and not the array?

Code:

Sheets(Array("Work Order", "Timesheet", "Communications")).Select
Sheets("Work Order").Activate
ActiveSheet.PrintOut Copies:=1, Collate:=True

I have also tried the following but it just prints out every page in the workbook.

Code:

Sheets(Array("Work Order", "Timesheet", "Communications")).Select
Sheets("Work Order").Activate
Sheets.PrintOut Copies:=1, Collate:=True

I've also tried the PIDOOMA approach with this and failed

Code:

Dim TechnicianPack As Variant
TechnicianPack = Sheets(Array("Work Order", "Timesheet", "Communications")).Select
Sheets("Work Order").Activate
TechnicianPack.PrintOut Copies:=1, Collate:=True

View 7 Replies View Related

Set Different Print Areas For Multiple Sheets

Jun 23, 2014

In making my label printer, I will need to set the print area for multiple sheets based on a range generated in a cell. E.g. Sheet1 might need cells A1:P1200 set as print area, Sheet2 might need cells A1:G694 set as the print area, Sheet3 might not need to be printed, etc..

I have no problem generating a formula to state what the print area for each sheet should be, respectively, but passing that info into VBA has me really stumped. (Using indirect in the Page Setup menu doesn't work after the value has changed, it changes the value to a static reference, which is bizarre). I suspect I'd want to use the Sub Workbook_BeforePrint, but I'm not 100% on that. I will generally have 3 or more specific sheets selected using a button-triggered macro that gets a cell value of sheet names and selects those sheets.

View 4 Replies View Related

Vba: Set Print Format Across Multiple Sheets

Jun 13, 2007

I'm trying to write a macro to select all the Sheets in a Workbook, and set some properties [Auto ColumnWidths, Landscape, and Fit to 1 page wide] for all of them.
I don't know the names of the sheets, nor how many there will be - this part is tagged on the end of a long macro that creates new files and pastes various data into them. The code below only seems to work on the Active sheet - not any of the others selected. Curiously, I can set a specific column width for all sheets, but not Auto Widths.

With ActiveWorkbook
Sheets.Select
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
End With

Sheets.Select
ActiveWindow.Zoom = 80 ' This line works!
Cells.Select
Selection.RowHeight = 13.5
Selection.EntireColumn.AutoFit
Columns("C:C").Select
Selection.ColumnWidth = 34 ' This line works
Range("A1").Select

View 2 Replies View Related

Print Multiple Sheets To Pdf File

Jun 11, 2008

I am working on a userform in which user can select diffrent sheets for print.
I want all selected sheets to be printed in a single pdf and it could be great if it not ask for a path to save file.

View 21 Replies View Related

Print Worksheets Based Upon Criteria

Oct 23, 2006

I have a monthly template that has 31 tabs labeled 1 through 31 for the days of the month. I would like to add a macro that would print only the sheets that have a value greater than 0 in either of two specific cells.

Example:

Sheet / Cell B2 / Cell B36 / Action
1 / 0.00 / 0.00 / Don't print
2 / 100.00 / 0.00 / Print
3 / 0.00 / 100.00 / Print
4 / 100.00 / 100.00 / Print

I could add a summary sheet that would pull over these values and/or add if statements that return results like "don't print" or "print" if it would be easier in the macro or I could just use the code in macro to determine to print or not.

I am a record and tweak macro user and this isn't something you can record. I found some simple code in another post that would print one page based upon single criteria but it isn't exactly what I was looking for.

View 9 Replies View Related

Print Data Based On Criteria

Dec 12, 2006

I have a sales workbook, with three sheets. Ongoing, Won, Lost, all potential sales are entered onto the Ongoing sheet and Ongoing is chosen in a column that has 3 options - Won, Lost, Ongoing, until brought to closure by winning the sale or losing it at which point Ongoing is changed to Won or Lost.

The products for sale are Audio, Video and System and at the top of the Ongoing sheet it totals those three categories as Won, Lost or Ongoing.

What I want the workbook to do is when the status of the sale is changed from Ongoing to either Won or Lost, the entire row is moved off the Ongoing sheet and placed on the appropriate Won or Lost sheet, and the totals at the top of the Ongoing sheet calculated accordingly.

One of the columns on the Ongoing sheet is 'Progress' in which a short abbreviated explanation is input of next steps of the sale. When the sale is closed, and hopefully automaticall moved to it's appropriate sheet, I'd like this text to be changed to either Won or Lost.

View 4 Replies View Related

Print Specific Pages On Multiple Sheets?

Dec 29, 2012

I have a workbook that has multiple sheets for patients (each named with SSN) with all such sheets having identical structure. I have the VBA code below that prints all sheets. Each sheet will have 7 pages when printed. Is it possible to amend the code so that it prints page 1 and page 3 from each sheets only?

VB:
Sub PrintSpecificSheets()
Dim WS As Worksheet, mySheets()
Redim mySheets(0)

[Code]....

View 1 Replies View Related

Macro: Print Ranges From Multiple Sheets

Dec 6, 2006

I am trying to write what I thought would be a simple macro to print out specific areas of my worksheets. I have shown the code below; the line causing the problem I have highlighted in RED. I am getting the following error message: "Select method of range class failed".

Reading other posts here. I think this may have something to do with the macro being assigned to a command button in one worksheet (AY114) and I am trying to get the macro to run on both the worksheet that the command button is in (AY114) as well as another worksheet (AY062).

Sub CommandButton1_Click()
Range("J2").Select
Sheets("AY114").Select
Range("A4:J53").Select
ActiveSheet.PageSetup.PrintArea = "$A$4:$J$53"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveWindow.SmallScroll Down:=45
Range("A56:M151").Select
ActiveSheet.PageSetup.PrintArea = "$A$56:$M$151"......................

View 4 Replies View Related

Print Page Based On Specific Criteria

Nov 10, 2006

I have a report which is split into page sized chunks, in column P I have an identifier Planned, Booked or Running.

Is it possible to build a macro which says something along these lines

If P1 = "RUNNING" Then
Print that Page
Else
Go to P44
If P44 = "Running" Then
Print that page
Else
Go to P87

and so on until the cell selected is blank then stop.

View 5 Replies View Related

Macro To Print A Variable Number Of Multiple Sheets

Aug 25, 2010

I am trying to build a macro to work with a template file.

The template file has set sheet numbers and names (with one exception, see 4) below).

There are close to 40 sheets in all.
Some sheets are never printed.
Some sheets are always printed.
Many sheets are printed only if they are used.
Most of the sheets are 'break out' sheets and a variable number of them will be used.

So... Here is what I'm trying to accomplish.

1) Always print Sheet4(Overview1)
2) Always print Sheet6(Overview2)
3) Print Sheets 11 thru 40 IF value in cell G50 on these sheets is > 0. Note that this cell has a name (Total) and I would like to reference the name if possible. (It could happen that further evolution of the Workbook moves the cell up or down a row.)
4) Print Sheet38(Data Sort) IF it exists. Otherwise, print Sheet1(Data).
If the information on the Data sheet is limited (eg only 1 or 2 pages), we print it off directly. If the information is more extensive, we copy it to a new sheet and sort it (Data Sort).

I can achieve 1) and 2). I'm not quite sure how to go about 3) as I'm still not very good with macro loops. 4) I haven't tackled yet.

View 3 Replies View Related

Excel 2007 :: VBA For Print Header For Multiple Sheets From One Source Sheet (but Not All)

Apr 18, 2013

I am working on a "3 worksheet" excel workbook. The first worksheet does not require any header.

I'd like to enter data into the second sheet (say cells A1 and B1), and use VBA to pull from those cells to generate the same custom header for both the second and third worksheets.

For example, I'd like the header to pull "# 123456" from cell A1, and "789" from B1 in sheet two, putting them in a centered header for both sheets two and three (same reference cells from sheet two for both, not new values of A1 and B1 from sheet 3 for sheet 3 header). I'd like to format in a way that looks something like this:

#123456

789

I'm currently running Excel 07, and was able to pull from a cell on one worksheet into that sheet's header but couldn't get it to span multiple sheets.

View 3 Replies View Related

Excel 2010 :: Counting Cells With Multiple Criteria On Multiple Sheets In Workbook

Aug 5, 2012

I am using MS Office 2010. I want to count---on multiple sheets---the number of times that a given cell is greater than another cell if and only if a third cell is equal to a given value. I want to do this for 4 sets of data on each sheet. I thought I had it figured out with this formula---

=SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$R1"),2*(AND("'"&$H$1:$H$43&"'!$E1">"'"&$H$1:$H$43&"'!$F1"))))+SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$S1"),2*(AND("'"&$H$1:$H$43&"'!$G1">"'"&$H$1:$H$43&"'!$H1"))))+SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$T1"),2*(AND("'"&$H$1:$H$43&"'!$I1">"'"&$H$1:$H$43&"'!$J1"))))+SUMPRODUCT(COUNTIF(INDIRECT("'"&$H$1:$H$43&"'!$U1"),2*(AND("'"&$H$1:$H$43&"'!$K1">"'"&$H$1:$H$43&"'!$L1"))))

but it returns a value of zero each time. Clearly there is an error in the formula.

Here is some background:
-- $H$1:$H$43 is a block of cells that has the names of the sheets in the workbook
-- E1 and F1, G1 and H1, I1 and J1, K1 and L1 are the four groups of cells that I am comparing.
In the entire workbook, I want to add 1 (counting function) only when:
R1=2 AND E1>F1 or
S1=2 AND G1>H1 or
T1=2 AND I1>J1
U1=2 and K1>L1
on each appropriate sheet in the workbook.

View 1 Replies View Related

Excel 2003 :: Formula For Counting Values Across A Range Using Multiple Criteria Across Multiple Sheets

Feb 9, 2014

I have saved this on a 2010 workbook as I am at home but this will be used on a 2003 workbook.

I have several projects on one spreadsheet which multiple users will be working and I am trying to create a summary sheet of the work carried out.

Each user is expected to carry out a task on each row of the data held in each worksheet (research, call, update etc) and each task (Option 1-5) is assigned a value. Each user is expected to meet a certain level of points per day to calculate productivity.

I am looking for a sumproduct along the lines of the summary sheet attached but mine just takes one sheet into consideration and I need one for all sheets.

View 12 Replies View Related

Excel 2010 :: Lookup Multiple Criteria Across Multiple Sheets?

May 28, 2014

I have a Excel 2010 workbook used to rota in a large amount of staff for a call centre, which is split into four teams. Each sheet corresponds to a month of the calendar year eg Jan201, Feb 2014 etc..

What im trying to do is put in a sheet at the front of the workbook that I can select the team, which populates the list of staff in that team and then checking across a specified date range gives the shifts that those respective staff will be working for the set time period (probably be looking at a seven day period and a 1 month period). (This in turn will be printed out to give to the staff members.)

View 2 Replies View Related

Grabbing Data With Multiple Criteria Across Multiple Sheets

Jun 24, 2014

I've attached a sample sheet to this message.

What I'm trying to do is grab data from the raw data sheet and paste it into the master sheet based off of certain criteria. I want to list any accounts that are not correct.

For example, I want to look through the Raw Data sheet, find the account that contains campaigns which are not correct, and then list the name of the account on the Master sheet. I only need the account name listed once on the Master sheet.

Sample Data.xlsx‎

View 4 Replies View Related

Sum Of Multiple Cells Within Multiple Sheets With Varying Criteria

May 5, 2013

I have a spreadsheet that has about 50 sheets and a summary sheet at the front the layout of the summary sheet is column A has skill sets from A4 to A20 and across the top it has week commencing dates from F3 to about BA3 (dates go from w/c 06/05/13 to 08/12/14). On the other sheets they have the dates in the same columns but the skill sets vary as to each project, some projects may have two of the same skill set in column A because there is two people needed who can do the same thing, I need to total up the days over the sheets for each week and skill set.

I have been using the SUMIF formula as follows:

=SUMIF('Sheet2'!A8:A10,'Summary'!A4,'Sheet2'!F8:F10)+SUMIF('Sheet3'!A8:A15,'Summary'!A4,'Sheet3'!F8:F15)

And so on for each sheet and then change the formula for the next skill set and then again for the next column.

Is there a way of doing this without having to enter a formula into each cell, at the moment I am coping and pasting the formula into word to do a find and replace to change the SummaryA4 to SummaryA5 etc and then into the next cell for the corresponding date.

So to make this seem like it makes any sense I am looking for say an 'Administrator' in all the project sheets over all the dates and for it to add it up for the summary sheet. Under the corresponding week against the skill set.

So it would be F4:F20 for w/c 06/05/13, G4:G20 for w/c 13/05/13 and so on until all skill sets.

View 5 Replies View Related

Sum With 2 Criteria Across Multiple Sheets

Dec 29, 2006

My question is similar to the thread Count/ sum with two criteria from multiple sheets. For example, I would like to use SUM Formula the number of widgets sold by store (Column A) by month (Row 5) for each salesperson (sheets Homer, Marge, and Lisa). I'm using the following Count Or Sum Two Criteria From Multiple Sheets equation to achieve the desired results: =SUMPRODUCT(SUMIF(INDIRECT("'"&$A$1:$A$3&"'!A:A"),$A6,INDIRECT("'"&$A$1:$A$3&"'!b:b")))

where my worksheet names are in range A1:A3, the store names are in range A6:A10, and the months are in B5:D5. However, for each month, I have to manually change the column ie. from "'!b:b" to "'!c:c", "'!d:d", etc. In my real worksheet, the columns extend down to ED so to manually change the range would be extremely time consuming.

View 8 Replies View Related

Macro To Print Sheets With Value In Cell A1 But Print Dynamic Ranges On Certain Sheet

Sep 24, 2013

I've found some code which works to print certain pages with value in cell A1 but I need to print dynamic ranges on some of the sheets as they will have filters on so the rows ranges will be different each time.

So far this is what I have but the dynamic range part is not working:

VB:
Sub Print_All_Worksheets_With_Value_In_A1()
Dim Sh As Worksheet
Dim Arr() As String
Dim N As Integer

[Code] ....

View 3 Replies View Related

SUMIFS With Multiple Criteria Between Sheets?

Mar 21, 2014

I'm trying to sum data based on a the criteria of a date being between a certain range and sorted by a particular name.

I have included a sample sheet with two tabs:

Totals-I would like to get the sum of the hours a person worked in the range of dates being 1/1/2014-1/24/2014 (which is D1 and E1 in the current charges sheet) Current Charges-this is the page that I would like to gather the information from.

Below is a sample of the formula I was trying to use, but I get an error....my interpretation of what I was trying to input is as follows: Sum C2:C34 in the current charge sheet if B2:B34 is greater than or equal to D1 on the current charges tab (which is 1/1/2014) and B2:B34 is less than or equal to E1 (which is 1/24/2014) with A4:A34 in the current charges sheet equal to A2 on Totals sheet.

SUMIFS('Current Charges'!C2:C34,'Current Charges'!$B$2:$B$34,">="&'Current Charges'!$D$1,Current Charges'!$B$2:$B$34,"<="&'Current Charges'!$E$1,'Current Charges'!$A$4:$A$34,A2)

Test Data:

SUMIFS Test Data.xlsx

View 14 Replies View Related

Search Multiple Sheets For Criteria In Col A?

Oct 30, 2013

I have thought about recording a vlookup but this might be messy and prone to errors. Is there anyway to search through multiple sheets for a value (code) in Col A sheet 1. And return X in sheet 1 in the next column.

View 2 Replies View Related

Printing Sheets Based On Criteria

Jul 10, 2009

I am looking for a macro that will, upon command, print all sheets (20+) in the workbook with a value greater than $0.00 in cell I27. Some have a value there, others don't.

View 2 Replies View Related

Two Sheets - Lookup Based On Several Criteria

Apr 29, 2013

I have 2 sheets.

Sheet one column A has random dates from 1 jan 2013 to present in order base on fuel purchase dates for our company.

sheet one column F has the purchase price i.e 3.98 gallon

Sheet one column A can have a date entry of lets say 2/4/13 with no data in F because no fuel was purchased just the meter was being read.

Then Sheet one column A can have 2/5/13 where column F has 3.78 where fuel was purchased. (these are 500 gallons tanks that are being refilled as needed)

Sheet 2 row B has just the month formatted as Jan 13, Feb 13, Mar 13, .... you can use B1, B2, B3...ECT for the remaining months

What I am looking for is on sheet 2 in cell C1 a way to look at B1 for the month (i.e Jan 13) look at a range of cells on sheet 1 column A for any dates that fall in the month of Jan, then look for data in corresponding F range and if no data is found then use the last months data (Dec 12)

I can make sure I place a dollor figure in the first row of Jan on the sheet, so by default we can use that if no data exist for Feb.

View 9 Replies View Related

Hide Sheets Based On Criteria

Sep 3, 2006

i would like to hide different sheets at one shut. i tried this, but did not work:

Dim sh As sheet
For Each sh(1 3 5 7 9).Visible =xlSheetVeryHidden

View 6 Replies View Related

Auto Print Based On A Cell Value For Multiple Works

Jun 10, 2009

There are 20 worksheets in my workbook. For the first ten, I would like to print out the only sheets in which cell E28 = 0. For the last ten, I would like to print out the sheets in which cell T1 = 0. Each sheet has a unique name.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved