Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to print only pages that are filled in | Excel Discussion (Misc queries) | |||
Count number of pages | Excel Worksheet Functions | |||
Return SEARCHED Column Number of Numeric Label and Value | Excel Worksheet Functions | |||
number 7 won't print | Excel Discussion (Misc queries) | |||
How to print a worksheet but number the pages by workbook | Excel Discussion (Misc queries) |