Print Selected Columns And Rows

Apr 27, 2013

I have a worksheet which contain a lot of data in it. I want only certain rows and columns to be printed when I click a button. Actually I am trying to print a report.

Suppose I have data across A10:M100. Lets say from columns A to D are permanent, if the cell colour of any cell from E to M is not Red then that is to be printed along with the contents in A to D. Since I have bunch of data in that sheet almost 10000 rows I separated data by giving them name. If it is possible to have an option to choose from before printing that would be much much better. Because even though there are many cells left uncoloured I don't want them to be in the print as they are belong to another table (I have given name for each table)

If all columns from E to M in row 20 are Red then that row should not appear in the print. If J20 is left uncoloured then it has to be printed along with the data from A20 to D20 ( which I said permanent). This colour I fill by a macro as when required only for the range E to M.

View 5 Replies


ADVERTISEMENT

Print Selected & Multiple Rows To A Form

Jul 12, 2008

The file consists of 3 sheets:Orders,Order Form PO1 & Purchase Order. When I mark "x" in the row that I want to print, Order Form PO1 will be displayed with all data in the specific columns. However, it only allows me to select one row at a time. Now, I want to select multiple rows so that it will pass the data to the sheet Purchase Order.

View 13 Replies View Related

Print All Columns And Certain Rows?

May 16, 2014

I have a print button and have defined a start row (srow) and end row (erow) per the code below. What arguments do I use within .printout to restrict the print to these rows? All the guides I have seen so far have predefined print areas so I don't know how to handle this variable.

[Code] .....

View 3 Replies View Related

Insert Two Columns For Selected Rows

Dec 6, 2008

I would like to select a number of columns and then run a macro that would insert two columns after each of the selected columns.

Or is there perhaps a faster way than using a macro?

View 9 Replies View Related

Scan The Rows (x) (of Which There Are 10), And Print The Data For The Corresponding Columns

Feb 28, 2007

I'm looking for a code that will scan the rows (x) (of which there are 10), and print the data for the corresponding columns (y) (of which there are 42).

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

Copy Selected Rows & Insert As Many Times As Rows Selected

Feb 6, 2008

The following code inserts a row below the selected row, and copies the formula of the row above into it.

Dim Rw As Integer
Rw = ActiveCell.Row
Selection.Insert Shift:=xlDown
Rows("" & Rw - 1 & ":" & Rw - 1 & "").Copy
Rows("" & Rw & ":" & Rw & "").Paste

However, I need to alter this to work for inserting more than one row at a time. ie. the user selects 'x' number of rows and 'x' rows are inserted below (in the same way 'Insert Row' works in Excel) and the row above the selection is copied down.

View 2 Replies View Related

VBA Code To Copy Selected Multiple Columns To Multiple Rows In Excel

Mar 13, 2014

I want to to copy selected columns of sales data into rows organized by salesperson. I have just started out with VBA and find that I cannot do it myself.

My original data are in the form of the following:

invoice_no
product
sales
qty
total

[Code] .....

I want to display the data in another sheet in the following format:

sales_a
sales_b
sales_c
sales_d

[Code] ...........

View 2 Replies View Related

Print The Selected Pages

Feb 20, 2009

There are 24 pages for printing and each one has different information on that sheet. From day to day some or all of the pages are needed. I would like the macro to look at each page and find a cell(different cell but same info on each page) and if the value of that cell is greater than 0 print that page. If not don't. I only need to calculate the "Bundle Tops" sheet. How do I write this. I am a beginner at the VBA code.

View 9 Replies View Related

Print Out Data That Is Variable In The Amount Of Rows To Print

Apr 15, 2009

I am trying to come up with a way to print out data that is variable in the amount of rows to print.

1. Cells C1 thru M6 is heading of report
2. Cells C7 thru M400 all have formulas and display information only when criteria in Column C in each row is met, if condition is not met it displays no informtion. (There lies my problem).

I need a way to print out only the area that information is displayed in and skip the areas that are not displayed. (Currently I have hard coded the print range using the largest report)

View 6 Replies View Related

Macro To Print Selected Sheets ...

Mar 16, 2009

in creating a macro so that I can print from sheet 1 to sheet name "XYZ" as an array. In other words I want to print selected sheets as one command so that page number in the footer will automatically change.

View 14 Replies View Related

Set Print Area From Selected Range

Jul 12, 2006

I have some code which selected a certain amount of columns depending on
whether they contain values or not. Once I have this range set and I select
it I want to set this as the print area. I am not quite sure how to do
this. for example I tried:

rngUnion.Select
ActiveSheet.PageSetup.PrintArea = ActiveCell. CurrentRegion.Address

View 9 Replies View Related

Print To PDF Selected Sheets From An UserForm Listbox

Jun 13, 2006

I have created a custom Menu (excel add-in) to make my work easy in excel. My problem is to print only selected sheets from Workbook in one PDF file, for that I've created a Userform with 2 listboxes, add sheet and print buttons. In the first listbox are listed all the sheets and in the second listbox are the sellected sheets to be printed. What I've succeded so far is to print selected sheets, but it creates one PDF file for each sheet, only if I put my code in workbook and not in Menu add-in (.xla file). As PDF Printer I use PDF reDirect Pro v2.

View 8 Replies View Related

View / Print Selected Options Contiguously Separate Page

Oct 24, 2008

I’ve created a worksheet containing many drop down lists that form an inventory of household effects. Once selected, I’d like to be able to view/print the selected options and quantities separately on one A4 page.

I don’t want the separately viewed/ printed page to contain anything other than the selected options. The problem I’m having is to arrange this new page as a contiguous list.

View 2 Replies View Related

Print Selected Sheets 1004 Application Defined Or Object

Oct 7, 2007

i have found this code on the net but can only get the control sheet to work when i run macro "PrintSelectedSheets" i get a run time error 1004 application defined or object error i have put the code in the workbook object but having problems, it seems to be because the sheets that i am trying to print are hidden can this code be edited

Sub PrintSelectedSheets()
Dim i As Integer
i = 2

Do Until Sheets("Control Sheet"). Cells(i, 1).Value = ""
If Trim(Sheets("Control Sheet").Cells(i, 2).Value <> "") Then
Sheets(Sheets("Control Sheet").Cells(i, 1).Value).Select
'ActiveWindow.SelectedSheets.PrintOut Copies:=1
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
i = i + 1
Loop
End Sub

This code seems to work ok

Sub CreateControlSheet()
Dim i As Integer

On Error Resume Next 'Delete this sheet if it already exists
Sheets("Control Sheet").Delete
On Error Goto 0...........................................................

View 2 Replies View Related

Referencing Selected Tabs To Print Selection & Update Table Of Contents Sheet

Nov 30, 2009

I searched but didn't find exactly what I needed. I have a workbook with 31 sheets. It is a price guide with each category on a separate worksheet. I figured out how to list the sheets on a separate tab. What my client wants is the ability to:

1. select certain categories for printing, the ToC, Cover and backcover pages have to print in every case

2. the ToC has to change depending on the sheets selected.

I'd rather write some code and give him an an easy command button rather then teaching him how to select non-concurrent sheets and printing only active sheets.

What I'm really stuck on is the updating of the ToC with active sheets only (category and starting page which changes depending on pages selected).

View 13 Replies View Related

Vba To Unhide Rows, Print, And Rehide Rows

Feb 9, 2007

I am attempting unhide the same exact rows in multiple worksheets in Excel, Print the entire workbook, and then re-hide the same cells. As I am still learning VB i have been unsuccesfull. I have attached the code that I am using,

Sub Printdoc()
Dim sh As Worksheet

For Each sh In ThisWorkbook.Worksheets

With sh
Rows("105:116").Select
Range("A105").Activate
Selection.EntireRow.Hidden = False
.PrintOut
Rows("105:116").Select
Range("A105").Activate
Selection.EntireRow.Hidden = True
End With

Next sh

End Sub

View 6 Replies View Related

Import Selected Columns?

Apr 21, 2014

I want to import one worksheet from different workbooks to Master workbook. In the source workbook, I need to import only ' Code' sheet and in this code sheet , I need only 4 columns(A, E, F, and I ) to import. I also need cell C3and E3 in source worksheet to master workbook

I want to import like 'Code(1), Code(2), Code(3),, and so on. I don't want to import whole thing in the one sheet in the master workbook.

IN the master workbook, the header is on A3, so starting row will be row 4 in master workbook.

Codes below is for 'stacked' style, I guess.

[Code] .....

View 8 Replies View Related

Delete All Columns Besides Two Selected

Aug 12, 2014

I'm prompting the user for what two ranges they want to keep in a excel sheet and then I want to delete the rest of the columns. There may be 5 total columns and there may be 30, it will vary. The reason I want to do this is because I will then save data to CSV file and it can only have two columns of data to be passed on for other data processing.

View 5 Replies View Related

Sum Selected Columns For Single Row

Aug 13, 2013

I'm trying to sum selected columns of a specific row in a spreadsheet. The row name is to be matched to the same name in a different sheet; the column headings are also found on that separate sheet. I've tried SUM using INDEX and MATCH, but it's not working (most recently I get #N/A). I'm trying to do this sum for each separate row, first through sixth, with varying columns for each row.

I'm not opposed to getting into VBA, but wanted to see if there was something that I missed with the regular formulas.

My most recent iteration is:
=SUM(INDEX('Current'!$A$1:$G$16,MATCH($A6,'Current'!$A$1:$A$7,FALSE),MATCH($B6,'Current'!$A$1:$A$16,FALSE)):INDEX('Curre nt'!$A$1:$G$16,MATCH($A6,'Current'!$A$1:$A$7,FALSE),MATCH($C$2,'Current'!$A$1:$A$16,FALSE)))

[Code] .........

View 2 Replies View Related

Printing Selected Columns

Nov 6, 2013

I have a data sheet which I need to print everyday, I need to print Column A plus other individual columns on separate pages. For eg. Column A + B, Column A + C, Column A + D etc until the last column. Besides hiding and unhiding, is there any way to do it via vba? For eg, pop up to ask user which column to print?

View 6 Replies View Related

Print 2 Selected Area (highlighted Area)?

Apr 11, 2013

How can I print 2 selected area (highlighted area). I know there is a trick to do that. Right now I can only select (highlight) one area to print, but would like to know how to print 2 or more areas at same time

View 7 Replies View Related

Print Columns On One Page

Jun 12, 2014

How do I print columns A:I, and calculating rows dynamically, to fit on one page in portrait.

View 2 Replies View Related

Print Only Non-adjacent Columns

Jun 11, 2008

I need to print non-adjacent columns in my worksheet. (A:J, M). The cells need to be visible when one opens excel, this I cannot permanently hide them.

View 4 Replies View Related

Rearrange Selected Columns Automatically

Jun 21, 2013

Daily I am getting a file which have so many columns with different names. I used to select and move my required columns to separate place. For exp.

I have the file with various columns, such are.

Sales Qty, Year, Tax, Company Code, Discount Paid, Sales Amount, Company Name

The above column order are not constant, daily the order will changes. But we have to make the order as below

Company Name, Company Code, Year, Sales Qty, Sales Amount, Tax, Discount Paid

Like this we have so many columns in the file and we used to rearrange as required.

Any formula or any macro to avoid this manual work with error, so that i will save my time and free from error.

View 2 Replies View Related

Hide/Display Selected Columns

Jul 13, 2009

My boss wants me to create a macro to hide columns if there is a "X" on top of the column labels. The macro should be in toggle mode whereby the next pressing of the macro will unhide the hidden column.

There are more than 50 columns in my actual worksheet. The macro has to check column by column whether there is "X" marked on top and hide it if so.

The next pressing of the macro should then unhide all the hidden columns.

View 12 Replies View Related

Macro To Copy Selected Columns

Aug 24, 2009

OK, I want to run a macro that will:

(1) go in to sheets 'A', 'B' and 'C'
(2) find all cells in row 1 that equal "1"
(3) copy the entire column and paste as values

View 13 Replies View Related

Print Only Filled Columns After Column J

Oct 29, 2013

I created a lab result page for long term patients. thus, they may have 1 to 1000 lab results. so i need to create an infinite print range, but just printing the filled ones.

Right after column J, print 2nd page if filled, if not, dont. And printing A1:J6 to every page is a good solution to not to lose data in long term.

[URL]

View 3 Replies View Related

Select And Print Used Pivottable Columns?

May 21, 2014

I would like to somehow select and print the used columns in my pivot table.

I currently have a code that prints TableRange2 but this also includes blank pivot tables columns which are not in use.

View 2 Replies View Related

View Number Of Columns From Selected Cells

Feb 14, 2014

When I select multiple cells horizontally at the top are highlighted columns for those cells.

I would need to know the number of those columns (es. 5), "on the fly", without having to rely on eye every time. This number maybe displayed in a status bar or other window...

View 4 Replies View Related







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