Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 90
Default need a print macro to print only a certain number of pages

i have a worksheet in which cell N10 counts the number of cells in
column D that have entries, and using an if statement, determines how
many pages need to be printed in order to print all rows that have
entries. The cell displays 1, 2, or 3 [pages], depending on the number
of rows that are filled in. For example, if the count is greater than
62, 2 pages have to be printed. If less than 62, only one page need be
printed. I have to do this because there are formulas in other rows
that go down all the way to the 169th row and 3 pages will be printed
out if i dont specify in the print range the number of pages i need
printed. Is it possible to have a macro use the cell value of 1 or 2 or
3 and then print only the matching required number of pages.

thanks

Tonso

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default need a print macro to print only a certain number of pages


Hi Tonso

You good amend this code

Sub print_1_2_3()
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
If rowcount = 62 Then
ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True
End If
If rowcount < 62 Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If

End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=562965

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 90
Default need a print macro to print only a certain number of pages

Thanks Jetted!!

tonso
jetted wrote:
Hi Tonso

You good amend this code

Sub print_1_2_3()
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
If rowcount = 62 Then
ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True
End If
If rowcount < 62 Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If

End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=562965


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
macro to print only pages that are filled in Tonso Excel Discussion (Misc queries) 0 July 6th 06 05:32 PM
Count number of pages rm81 Excel Worksheet Functions 3 June 9th 06 05:52 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
number 7 won't print Debra Excel Discussion (Misc queries) 1 January 12th 06 11:24 PM
How to print a worksheet but number the pages by workbook Frank Clayton Excel Discussion (Misc queries) 2 January 10th 05 10:52 PM


All times are GMT +1. The time now is 03:08 AM.

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

About Us

"It's about Microsoft Excel"