Displaying all rows, printing only certain rows

G

Guest

Hi,

I have a sheet that is printed out on a daily basis which is basically a
list of tasks to do.

Some of the tasks only run on certain days and not others, some tasks are
done everyday.

Basically what I would like to do is when the worksheet is open on screen,
it displays all rows for editing etc, but when I print the worksheet out, it
only prints rows relevant for that day and hides the rows not relevant.

Any help would be greatly appreciated.

Thanks.
 
D

Dave Peterson

I think I'd apply Data|Filter|autofilter to that range.

Then right before I print filter on the date column to show just the dates in
which I'm interested. Then print those visible rows and then
data|Filter|showall to see everything after the print.
 
G

Guest

Hi Dave,

yes thats what I wound up doing, adding an extra column and then running an
auto filter - is there a way to set this up so that it hides a column, prints
the document, then unhides it again?
 
D

Dave Peterson

How about sticking that column in Column A.

Then use file|Page setup|sheet tab to specify your range--and don't include
column A.

(You could also put it to the right, too)

But if you want, you could have a macro that hides the column, prints the sheet,
and unhides the column:

Option Explicit
Sub testme03()

With Worksheets("sheet2")
.Range("e1").EntireColumn.Hidden = True
.PrintOut preview:=True
.Range("e1").EntireColumn.Hidden = False
End With

End Sub

(I used preview:=true to save a few trees while testing.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top