Print range

L

Lawman

I want to create a worksheet so that when I click Print, Excel will
automatically print the area defined a top left cell that contains a
particular value in a specified column and the lower right cell is a
manually defined offset from the top left.

In particular, the top left value is to be =TODAY() looked up in a column of
sorted dates, and the offset coordinates will entered in a cell(s) on the
worksheet

Many thanks

Lawman
 
J

John C

Assumptions: Sheet name = Sheet1, column with date = A, cell with how many
rows deep you want printed = cell G1, total columns worth of data is 6.

First, randomly select some cells and set as print area (this is just to
ensure print area will be defined correctly). Then go to
Insert-->Name-->Define, highlight the Print_Area, and in the refer to box,
type the following formula:

=OFFSET(Sheet1!$A$1,MATCH(TODAY(),Sheet1!$A:$A,1),0,Sheet1!$G$1,6)

Hope this helps!
 
L

Lawman

Helps? Ideal!

Thanks John

Lawman


| Assumptions: Sheet name = Sheet1, column with date = A, cell with how many
| rows deep you want printed = cell G1, total columns worth of data is 6.
|
| First, randomly select some cells and set as print area (this is just to
| ensure print area will be defined correctly). Then go to
| Insert-->Name-->Define, highlight the Print_Area, and in the refer to box,
| type the following formula:
|
| =OFFSET(Sheet1!$A$1,MATCH(TODAY(),Sheet1!$A:$A,1),0,Sheet1!$G$1,6)
|
| Hope this helps!
| --
| John C
|
|
| "Lawman" wrote:
|
| > I want to create a worksheet so that when I click Print, Excel will
| > automatically print the area defined a top left cell that contains a
| > particular value in a specified column and the lower right cell is a
| > manually defined offset from the top left.
| >
| > In particular, the top left value is to be =TODAY() looked up in a
column of
| > sorted dates, and the offset coordinates will entered in a cell(s) on
the
| > worksheet
| >
| > Many thanks
| >
| > Lawman
| >
| >
| >
|
 
J

John C

One thing to be aware of, if you ever change the parameters of the worksheet,
such as margin, number of rows to print at top, your sheet MAY remove the
offset and hardcode what was last printed. Just be aware.

Also, if question was answered, be sure to check it, thank you!
 

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