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


ADVERTISEMENT

Print Worksheets Based On Information In Column

Jun 1, 2006

I have a workbook with many sheets, all of which derive information from the first sheet. On the first sheet, I enter values from say J1:J29. Each of these values is fed into one of the subsequent worksheets. I would like to have some code that would look at my range, determine which cells are used and print the corresponding worksheets. Write now I have a bunch of If statements that say

If Sheets("Worksheet").Range("j8") > 0 Then
Sheets("698-ALY W1222").PrintOut
End If




the problem is that it takes to long as each statement is evaluated and the print command sent.

The values in column J have names in column I and while the names do not exactly match the worksheets, a person could look at the name and match the correct sheet. For instance the name in column I that corresponds to the worksheet name 698-ALY W1222 is 698/ALY.

Thanks
Bryce

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 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

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 View Related

Copy Between Worksheets Based On Criteria

Oct 26, 2006

I need to assign to variable the number of cells in axle "Y", I explain them, I have assigned to the variable "Celda" the number "4" that, celda = 4 where 4 is the number of cells where begin the information that i need to copy,at firts they were separated sheets, and the macro it was working, assigning a letter a the processed row in the column of the left, but now is a one sheet, and I need, this macro find the last cells that the contain a letter in the left and assign the number of cells to the variable "celda" dont the range for example "A33" else "33" and begin toward down, I have this

Workbooks(origen).Activate
Application.ScreenUpdating = False
celda = 4 'where the number 4 will be changed for the number of cells in axle "Y" in this case "33"
celda2 = 4
cdestino = 1
While Workbooks(origen).Worksheets(1).Cells(celda, 2).Value <> ""
dato = Cells(celda, 2).Value
Select Case dato
Case "Aplicación de material"............

View 2 Replies View Related

Summarize Multiple Worksheets Based On Criteria?

May 30, 2014

I want a summary list of data from all columns of worksheets that contain the target data and only where the value in col D is 1. So, in the attached example, the data to be checked is on Sheet1 and Sheet2 and the result should be shown on Summary sheet. There will be some tabs that don't need to be checked for the data so it's not a case of check all other tabs except for Summary.

View 14 Replies View Related

Adding Worksheets Based On Cell Criteria

Aug 4, 2006

I would like one column (column A) to be an "indentifier" column. Column B is the customer name, column C is the customer city and state, column D is the customer phone number, and column E is the customer email.

By calling column A an "identifier" column, what I mean is that I would like to be able to go down the list and put an "x" next to each customer I would like to include in that particular workbook. I would then like to be able to run a macro which would take each of the customers with an "x" in the column A, create a copy of the template comfirmation call sheet, and fill in the identifying information from columns B through E into the copied template. Each worksheet would also need to be renamed the same as the customer name. It would need to perform this same procedure for each row that has an "x," making sure that all worksheets (confirmation call sheets) are grouped into one new workbook.

Sheet 1 is called "main"
Sheet 1 contains 5 columns
A = Blank
B = Customer Name
C = Customer City and State
D = Customer Phone
E = Customer email

Sheet 2 is called "template"

"x"'s are placed into "main" sheet, column A to identify which customer will be affected by macro...................

View 2 Replies View Related

Copy Data Across Multiple Worksheets (based On Three Criteria)

Feb 16, 2010

I have data on a worksheet (“Interface”) that I need to copy over 7 other tabs for analysis.

("Module_1", "Module_2", "Module_3", "Module_4", "Module_5", "Module_6", "Module_7").

The linking Field on the Interface tab defines what row I need to paste the data to on Module 1-7. The column headers are the same on both the interface and other tabs (“YES, NO, N/A, BLANKS, STANDARDS MET, STANDARDS NOT MET, NOT APPLICABLE”)

The tab is selected based on the row
Module 1Medication Management
Module 2Privacy
Module 3Process
Module 4Patient Safety
Module 5Medical Records
Module 6Infection Control
Module 7Environment of Care

I’m trying to modify code written for a similar purpose with no luck. This is the code I'm trying to modify. I know I'm not on the right track yet.

View 2 Replies View Related

Copy Rows From Multiple Worksheets To New Condition Based On Criteria

Nov 20, 2012

I have multiple sheets with the same format.(all columns have same format) in column "A" i have a value lets say "B1-1".

What I need to do is to copy from all sheets the rows containing in column "A" the same criteria("B1-1") to a new sheet and skip the rows that have a blank cell in Column "A".

View 5 Replies View Related

Compare Two Worksheets(one Acts As Template) And Copy Based On Criteria(greater Than

Jun 20, 2006

Here is what i want to do. # I have a workbook say 'Template', which has two columns: ColA -> Names , ColB -> Value, his acts as a template, i.e a budget. # Another workbook 'sample' which has similar ColA(may contain additional rows) and corresponding value in ColB.

Here is what i need::

I need to copy the contents of ColA and ColB of 'sample' wholse ColB valules are greater than ColB values of 'Template' for corresponding ColA values in both, into a new workbook. SO basically, template acts as a budget check for the sample workbook, and if any value in ColB goes above the budget in template, it will show up in the new workbook. I have attached both the workbooks. Basically the red highlighted cells in Sample are the ones i want in a new workbook.

View 7 Replies View Related

Print Selected Worksheets As One Print Job

Apr 23, 2008

I have a macro to print selected worksheets. It works well with one small problem. Whether I select the last worksheet or not, it always prints. I have tried a bunch of different ways to get around this, and all I succeeded in doing was getting a separate page printed first, then it would print the rest of my selection.

Sub PrintReportSelection()
Sheets("Actual").Select
Application.Goto Reference:="Actualprint"
ActiveSheet.PageSetup.PrintArea = "Actualprint"
Sheets("Deposits").Select
Application.Goto Reference:="Depositsprint"
ActiveSheet.PageSetup.PrintArea = "Depositsprint"
Sheets("Debt").Select
Application.Goto Reference:="Debtprint"
ActiveSheet.PageSetup.PrintArea = "Debtprint"
If Range("SelectVariance") = True Then Sheets("Variance").Select.........................

View 6 Replies View Related

Print Multiple Worksheets As 1 Print Job

Jun 2, 2008

I'm using VBA code to select several worksheets at once, and print them. The code runs fine, but the result is multiple print jobs, not one job. This is OK when printing to the printer...but undesireable if you want to print to a pdf file, for example.

I've searched the site and found some references to this possibly being an excel problem. Is that true?

I've also checked the page setup setting to make sure that the print resolutions are all the same...that doesn't appear to be the problem either.

View 6 Replies View Related

Copy Column Data From Multiple Worksheets To Single Worksheet Based On Header Criteria

Oct 18, 2013

I have a workbook with many sheets of similar but not identical data. I need to extract columns from each sheet based on 5 header criteria and paste them to a single sheet. Each worksheet contains these 5 criteria.

I've been working with the VBA script I've pasted below. It's grabbing the 5 column criteria that I have in sheet 12, and comparing them to sheet 1 in the workbook, then copying them to sheet 12. This much is good, but I need the script to also return the data from the other worksheets as well. I've tried modifying the script based on other loop functions in other scripts I've found, but I'm not having any luck.

View 14 Replies View Related

Print Only Certain Worksheets

Mar 21, 2002

I want to make a popup or some type of inquiry menu where it asks the user to specify which worksheets in the workbook to print. I have a data entry page, and four printable worksheets.

Sometimes I only want to print two of the worksheets, but not the data page or the other two. Any way to do this besides printing the entire workbook or one worksheet at a time? It would be ideal if a popup menu came up with checkboxes for all of the available worksheets and the user could check off which ones to print.

View 9 Replies View Related

Print All Worksheets As PDF

Jul 24, 2008

I have a template with 25 very hidden sheets in it, my userform, unhides and slightly modify's some of the sheets. When my userform is completed, there are between 2 and 11 sheets visible. I am trying to put code behind a button on a sheet that will save all sheets to one PDF file. The code below works but makes individual files.

select all active files as pdf

I know it's close but the code to select all active sheets is messed up.

Sub PDFit() ...

View 9 Replies View Related

Disable Print For The Set Of Worksheets

May 11, 2014

Is there any chance to cancel print for set of worksheets? For example in workbook with Sheet1 to Sheet4, i wish to allow printing only for sheet4 and all other sheets to disable print.

View 6 Replies View Related

Print Button On Various Worksheets?

Jan 8, 2014

I have an Excel form that contains 7 tabbed worksheets, one for each day of the week Sun thru Sat, that is a nutrition tracker and an 8th tab which is a food library. I put two buttons on the food library to automatically sort it by different categories and they work great for me. Then I put a printer icon on each of the daily sheets to print a single worksheet (in B&W) with the following macro changing the "from" and "to" to correct worksheet number for each day. Screenprint below.

Using "Monday" worksheet as an example I first tried using sheet number 10 as shown in the VBA Project below for the "From" and "Two" and it printed the wrong pages, so I went to the worksheet number as they are tabbed in the file, Monday being sheet 2, and it works fine (on my computer).

It works great from my computer, but if I send it to someone else and they try to print they receive the following errors: When they open the spreadsheet and click the print button this error comes up:

If they click "OK" on the above error this comes up

I've tried to include information that is revelant.

View 2 Replies View Related

Print Specifice Worksheets

Feb 14, 2007

I am looking for a way to have print icons on my spreadsheet that will print certain worksheets once clicked on.

For example: My spreadsheet has several countries, UK, France, Germany...

If clicking on the print icon next to Germany - i would like only the German worksheets to be printed - there would be several worksheets for each country.

View 9 Replies View Related

Set Print Orientation On All Worksheets

Feb 8, 2008

how would I change the orientation on ALL my worksheets, I'm saying every single one, imagine I got like 100 for the purpose of this excercise (sorry I'm not trying to make this harder, it's just there's always that one guy that'll come on and say 'Go to Print Print Preview, then click on Setup' or something like that.

So yeah, that's pretty much the question that I have for you brainaics:

How do I change the printer orientation setting to landscape on all worksheets (maybe a loop?).

View 3 Replies View Related

Locking Print Areas On 7 Worksheets

Feb 27, 2013

I have locked print areas on 7 work sheets. I have successfully printed them at 1 time. However it appears as if the print areas have to be set again before I print them again? What's up.

View 2 Replies View Related

Displaying Print Menu Of Worksheets?

Feb 4, 2014

In the excel file is a VBA code that is combined with a button if someone click on the button a little menu shows with a multiple options of sheets that can be printed. Only the problem is when i hide the sheets the code doesn't see them anymore and the only I can print is the page where the button is placed.

View 4 Replies View Related

Display A Menu Of Worksheets To Print Out

Jun 24, 2009

I came across the following macro that generates a list of worksheets with check boxes to select the ones I want to print. I attached the macro to a button on my "Totals" worksheet. When I run the macro, it lets me pick the worksheets, but doesn't print anything unless "Totals" is one of the worksheets I selected in the dialog box. What is missing?

I also want to stop the screen flickering and have it go back to the "Totals" page when it's done since that's where the button is.

View 14 Replies View Related

Print Multiple Pages And Worksheets To PDF?

Aug 25, 2013

In my excel, i have 3 worksheets. On the first worksheet, i have 2 pages since i have 2 sections side by side. I can't stack the sections due to different column widths. I am trying to see if there is a macro to stack the 2 pages on the first worksheet as one pdf page, and then have worksheets 2 and 3 as pages 2 and 3 of the pdf.

View 1 Replies View Related

Userform To Print Visible Worksheets..

Sep 20, 2007

I have a form to allow users to select and print pages from a workbook.

Private Sub UserForm_Initialize()
Dim sht As Worksheet

For Each sht In ActiveWorkbook.Worksheets
ListBox1.AddItem sht.Name
Next sht
Me.Height = 128
End Sub

Only problem is that this lists all worksheets in the form. Need to modifying it so that it does not list worksheets that are xlSheetVeryHidden.

View 2 Replies View Related

Macro To Print Existing Worksheets

Feb 12, 2008

I'd like to create a macro that can access few existing worksheets from different workbooks and print them automatically when i press the button or select them.

Tried userform and listbox that were suggested from other thread, but that didnt work quite well since I'm not quite understand the code behind it.

View 9 Replies View Related

VBA Macro To Consolidate Several Worksheets Into One & Print

Apr 11, 2009

I used a Macro from here that creates one worksheet from several then prints and deletes it. However the Macro doesn't carry over my column/row size formats. Is there a fix?

View 2 Replies View Related

Print All Worksheets Before Specific Sheet

Apr 21, 2008

I am seeking the most efficient code to print all excel worksheets beginning with sheet "XYZ" and ending with the last sheet in the workbook.

- Sheet "XYZ" is always the starting point
- The number of sheets after "XYZ" is variable
- The names of the subsequent sheets are unique and not sequentially named/numbered
- The printing will be to one report (i.e. don't print pages individually)

View 2 Replies View Related

Print To Exclude Fill Colors On Worksheets

Oct 7, 2008

The bright colors work well, but when they print the sheet on a laserjet black/white printer, the colors make the data almost impossible to read.

Is there a way to allow them to print the sheets and, by default, not print the background fill colors?

View 3 Replies View Related

Print Specific Worksheets In Multiple Files To PDF

Aug 13, 2012

I'm trying to find a solution to print to PDF specific worksheets in multiple Excel files. The files reside in the same directory, and I would like to be able to print them all at once to PDFs.

View 3 Replies View Related







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