Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selective printing rows/data 1

Status
Not open for further replies.

modmac

IS-IT--Management
Oct 11, 2003
31
0
0
US
I have a workbook that has 7 sheets. One sheet has approx. 1000 lines/rows of data. My users may select one row or 100 rows. Instead of printing out every page I would like to be able to send the rows selected either to a new sheet or an existing sheet.
 
Set the print range to the entire sheet, use a helper column at the end of the data (Don't include it in your print range) to allow them to put an x against the rows they want to print, and then use Data / Filter / Autofilter to filter on x to get just those rows. Then they can just hit print and only the selected rows will be printed.

This will cetainly beat trying to control multiple selections using CTRL.

Regards
Ken...........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Both of those suggestions would work for me but not for the users that will be using this workbook. I would like the users to be able to just press the print button. I understand that just doing that on that sheet would printout the entire 30 pages, that is why I'm looking to export the rows with value in a certain column to another existing sheet or a new sheet.

For example let say there is a value in cell E9 and E234, I would like for rows 9 and 234 to be printed.

Selective printing would be O.K. for 1 or two rows but not for 50. I like the idea of using the x and auto filter but is there a way for me to set it up so the users can just print without having to set it up each time they use the worksheet.
 
Ahh - More data always helps :)

Can we now take it that your users have a blank spreadsheet, fill data in such as perhaps an order form, and then you want to print the non blank rows???

If so then the autofilter can be set up the input field such that you filter on Non-Blanks, or you can set up a macro that does that bit automatically, prints the form and then takes off the filter ready for next time.

Regards
Ken................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Yes and no, It is an estimate form that has a list of items, cost and extended cost. for example


A B C D
1 Product Unit Cost Quantity Ext. Cost

2 R11 45.00
3 Switch 33.00 2 66.00
4
.
.
I have about 30 pages of this and I would like to print out or export to another sheet the rows only if there is a value in column C.


 
OK, so they either use Autofilter, or you give them a button to do it for them. This means a macro:-

As an example

Code:
Sub PrintMe()
    With ActiveSheet.Columns("C:C")
        .AutoFilter Field:=1, Criteria1:="<>"
         ActiveWindow.SelectedSheets.PrintPreview
        .AutoFilter
    End With
End Sub

Regards
Ken...........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
This works great, Thank You very Much!!
 
You're very welcome :)

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top