Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
smplogc
 
Posts: n/a
Default Automated Dynamic Printing Area?


Is this possible?

Say you have a 200 row spreadsheet with various functions being
performed in the bottom cells. If only the first few rows are filled
with data, when printed, all the empty rows that won't fit on on the
first page will automatically be omitted, except for those important
bottom rows. So the first page will have the rows filled with data,
plus empty rows to fill out the page, and the bottom rows.

If there are one too many filled rows to fit on one page, then a second
page will be printed with enough empty rows to fill the page, with the
bottom rows included at the bottom of the second page.

In other words, I want print jobs to be scaled in terms of pages based
on filled rows, with important bottom rows automatically added at the
end of the last page of the job.


--
smplogc
------------------------------------------------------------------------
smplogc's Profile: http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072

  #2   Report Post  
Posted to microsoft.public.excel.misc
starguy
 
Posts: n/a
Default Automated Dynamic Printing Area?


you can do this by hiding empty rows in between your data rows. you can
do this very quickly by using commands.

first select your data range which you want to print (from top to
bottom).
then File Print Area Set Print Area

now when you want to take print Just apply following commands.
click on cell in row next to your entered data.
press Ctrl+Shift+Down Arrow Key (it will select all blank rows to last
row which has functions).
Now hold only Shift key and press Up Arrow. It will deselect the row
which has data (Functions).
Now press Ctrl+9 (nine below F8 not on numeric key pad), it will hide
your empty rows.
and at last press Ctrl+P to print the document.

It seems long process but it is't so. It take just 3 to 5 Seconds to
take a print. (because I used to do this on regular basis)


--
starguy
------------------------------------------------------------------------
starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=537072

  #3   Report Post  
Posted to microsoft.public.excel.misc
smplogc
 
Posts: n/a
Default Automated Dynamic Printing Area?


Thanks for the reply.

The problem is that my spreadsheet will be used by very
computer-illiterate people, and I'd like to make tasks as simple and
fool-proof as possible. :)


--
smplogc
------------------------------------------------------------------------
smplogc's Profile: http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072

  #4   Report Post  
Posted to microsoft.public.excel.misc
PY & Associates
 
Posts: n/a
Default Automated Dynamic Printing Area?

You must know how many lines your print page holds;
You must also be able to count the rows one way or another;
then you can do what you want.

"smplogc" wrote in
message ...

Thanks for the reply.

The problem is that my spreadsheet will be used by very
computer-illiterate people, and I'd like to make tasks as simple and
fool-proof as possible. :)


--
smplogc
------------------------------------------------------------------------
smplogc's Profile:

http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072



  #5   Report Post  
Posted to microsoft.public.excel.misc
smplogc
 
Posts: n/a
Default Automated Dynamic Printing Area?


PY & Associates Wrote:
You must know how many lines your print page holds;
You must also be able to count the rows one way or another;
then you can do what you want.


Hehe, yup, but I don't know how to implement that in VB code or
whatever method would do the trick.


--
smplogc
------------------------------------------------------------------------
smplogc's Profile: http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072



  #6   Report Post  
Posted to microsoft.public.excel.misc
PY & Associates
 
Posts: n/a
Default Automated Dynamic Printing Area?

Hehe, I say "tips", but you guys do all the work!

"smplogc" wrote in
message ...

PY & Associates Wrote:
You must know how many lines your print page holds;
You must also be able to count the rows one way or another;
then you can do what you want.


Hehe, yup, but I don't know how to implement that in VB code or
whatever method would do the trick.


--
smplogc
------------------------------------------------------------------------
smplogc's Profile:

http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072



  #7   Report Post  
Posted to microsoft.public.excel.misc
smplogc
 
Posts: n/a
Default Automated Dynamic Printing Area?


This is the best solution I could find on my own. It's not my code, of
course - I don't know VB, but I'm starting to understand it.

Sub Hide_Print_Unhide()
Dim rw As Long
Application.ScreenUpdating = False

With Sheets("Sheet1")
For rw = 33 To 111
If Application.WorksheetFunction.CountA( _
.Cells(rw, 1).Range("A1:F1")) = 0 Then _
.Rows(rw).Hidden = True
Next rw
.PrintOut ' for testing use .PrintPreview
.Range("A33:A111").EntireRow.Hidden = False
End With

Application.ScreenUpdating = True
End Sub


- rows 1-11 are header text and column headings that appear on every
page
- rows 12-32 are the minimum number of data rows that appear on the
first page
- rows 33-111 are additional rows that will only print if they contain
any data
- rows 112-115 will always print underneath whatever number of data
rows are printed (from 21 to 100)

My ragtag abomination of a spreadsheet is coming to life!


--
smplogc
------------------------------------------------------------------------
smplogc's Profile: http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072

  #8   Report Post  
Posted to microsoft.public.excel.misc
smplogc
 
Posts: n/a
Default Automated Dynamic Printing Area?


This is the best solution I could find on my own. It's not my code, of
course - I don't know VB, but I'm starting to understand it.

Sub Hide_Print_Unhide()
Dim rw As Long
Application.ScreenUpdating = False

With Sheets("Sheet1")
For rw = 33 To 111
If Application.WorksheetFunction.CountA( _
.Cells(rw, 1).Range("A1:F1")) = 0 Then _
.Rows(rw).Hidden = True
Next rw
.PrintOut ' for testing use .PrintPreview
.Range("A33:A111").EntireRow.Hidden = False
End With

Application.ScreenUpdating = True
End Sub


- rows 1-11 are header text and column headings that appear on every
page
- rows 12-32 are the minimum number of data rows that appear on the
first page
- rows 33-111 are additional rows that will only print if they contain
any data
- rows 112-115 will always print underneath whatever number of data
rows are printed (from 21 to 100)

My ragtag abomination of a spreadsheet is coming to life!


--
smplogc
------------------------------------------------------------------------
smplogc's Profile: http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072

  #9   Report Post  
Posted to microsoft.public.excel.misc
PY & Associates
 
Posts: n/a
Default Automated Dynamic Printing Area?

For your reference. Tested on screen, OK

copy data to temp sheet

rownr = Cells(1, 1).End(xlDown).Row
p = Int(rownr / 56)
b = rownr Mod 56

If p = 0 Then Rows("56:199").Delete
If p = 1 Then Rows("112:199").Delete
If p = 2 Then Rows("168:199").Delete
If p = 3 Then
b = b + 169
Rows(b & ":199").Delete
Rows(b & ":223").Insert
End If

reset printrange before print

"smplogc" wrote in
message ...

This is the best solution I could find on my own. It's not my code, of
course - I don't know VB, but I'm starting to understand it.

Sub Hide_Print_Unhide()
Dim rw As Long
Application.ScreenUpdating = False

With Sheets("Sheet1")
For rw = 33 To 111
If Application.WorksheetFunction.CountA( _
Cells(rw, 1).Range("A1:F1")) = 0 Then _
Rows(rw).Hidden = True
Next rw
PrintOut ' for testing use .PrintPreview
Range("A33:A111").EntireRow.Hidden = False
End With

Application.ScreenUpdating = True
End Sub


- rows 1-11 are header text and column headings that appear on every
page
- rows 12-32 are the minimum number of data rows that appear on the
first page
- rows 33-111 are additional rows that will only print if they contain
any data
- rows 112-115 will always print underneath whatever number of data
rows are printed (from 21 to 100)

My ragtag abomination of a spreadsheet is coming to life!


--
smplogc
------------------------------------------------------------------------
smplogc's Profile:

http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072



  #10   Report Post  
Posted to microsoft.public.excel.misc
smplogc
 
Posts: n/a
Default Automated Dynamic Printing Area?


PY & Associates Wrote:
For your reference. Tested on screen, OK


I'll experiment with your code. Thanks a lot.


--
smplogc
------------------------------------------------------------------------
smplogc's Profile: http://www.excelforum.com/member.php...o&userid=33887
View this thread: http://www.excelforum.com/showthread...hreadid=537072

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple pages after printing selected area Lynn Excel Discussion (Misc queries) 1 April 17th 06 04:28 PM
dynamic print area GeorgeW Excel Worksheet Functions 7 February 23rd 06 06:11 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Block an area of sheet from Printing? lbbss Excel Discussion (Misc queries) 4 June 8th 05 07:21 PM
Printing - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"