Variable Print Length

I have a worksheet with 10 columns and 1 to 100 rows depending on the 
number of clients we have in a day. I would like to write a macro that 
automatically figures out the print size necessary and prints the sheet 
or sheets necessary to print all the information. For example suppose 
that on day 1 the last row with data is row 20. Since the sheet will 
print 30 rows per page, then the print size would be A1:J30. If, 
however, the number of rows used on day 2 is 49, then  pressing the 
[Print] Button (that would run the macro) would print 2 sheets; the 
first with the first 30 rows and the second with the final 19 rows.
0
livelonger (29)
1/26/2007 1:45:59 AM
excel 39879 articles. 2 followers. Follow

1 Replies
694 Views

Similar Articles

[PageSpeed] 27

Elfego,

By "Print size" do you mean the Print Area?  Normally, it's not necessary to 
do anything special to print a large or small worksheet.  Just Print.  It 
prints it on as many pages as necessary.
-- 
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Elfego Baca" <livelonger@gmail.com> wrote in message 
news:iZKdnYMZzsXEwCTYnZ2dnUVZ_r-onZ2d@comcast.com...
>I have a worksheet with 10 columns and 1 to 100 rows depending on the 
>number of clients we have in a day. I would like to write a macro that 
>automatically figures out the print size necessary and prints the sheet or 
>sheets necessary to print all the information. For example suppose that on 
>day 1 the last row with data is row 20. Since the sheet will print 30 rows 
>per page, then the print size would be A1:J30. If, however, the number of 
>rows used on day 2 is 49, then  pressing the [Print] Button (that would run 
>the macro) would print 2 sheets; the first with the first 30 rows and the 
>second with the final 19 rows. 


0
someone798 (944)
1/26/2007 1:55:32 AM
Reply:

Similar Artilces:

Printing Labels for Assembly Items
Before you even suggest it: Kits will not work in this instance. We sell, among other things, mattresses. Mattresses are usually sold in sets (mattress & boxspring) though some customers buy just a mattress and occassionally we do sell a boxspring by itself. We carry two lines of mattresses, for the sake of this discussion I'll call them Good and Better. There are three lines of Good mattress that share a common Good boxspring. There are seven lines of Better mattress that also share a common Better boxspring. We practically never order equal numbers of mattress & boxsp...

Printing Worksheet
Is it possible to print a worksheet which shows the cell nos and row nos. If you check the comment box which sais " show comments at end of sheet" it states the particular cell for each comment, but relating that to the actualo cell on the worksheet is difficult. If the work sheet showed the cell references, there would be no problem. Can this be done and how? Hi, Under Page Setup > Sheet > Print > Row and Column Headings -- Regards, Ashish Mathur Microsoft Excel MVP "GANTRYMAN" <GANTRYMAN@discussions.microsoft.com> wrote in message...

Limiting Printing to certain sheets...
I have a 7-sheet workbook that I want to print, but one of the sheets I don't want printed. It must stay visible, so hiding it is not an option. I can make the print area a blank cell, but this prints a blank page, also not good. What can I do? for each ws in worksheets if ws.name <>"dontprintthisone" then ws.printout next "Steve Hillin" <stevehillin@hotmail.com> wrote in message news:d0d78710.0311060818.2d46ee42@posting.google.com... > I have a 7-sheet workbook that I want to print, but one of the sheets > I don't want printed. It must stay ...

Printing with Outlook
When printing out specific emails, they either print with the email headers (the from, to, subject) or without. I have selected File -> Print or hitting the print icon directly. Even played with the settings inside the print setup. I am using Outlook 2003 with Exchange 2003 in the backend. Any ideas? I'm guessing you installed IE7. You can usually get the message to print normally by printing with reduced margins or using a shrink to fit page type option. The only other fix I know of is to go back to IE6. -Peter "Alpha Man" <alphaman@fake.com> wrote in mess...

Number of times pick list printed
Is there any way to know how many times a pick list has been printed (like the times printed field for orders)? If not, is there any way to query the temp table that report writer uses to determine if a pick ticket has been printed? Thanks. -- Jim@TurboChef You could find whether a pick ticket is already printed or not, by looking into the value in indpickprnt field of sop10200 table. Value 1 in it represents it is already printed. "Jim@TurboChef" wrote: > Is there any way to know how many times a pick list has been printed (like > the times printed field for orders...

How do I recover Excel document printed but not saved
I created a large Excel spreadsheet, saved it at various stages, and then printed the finished version. I then made a change I didn't want to keep, so closed the document and clicked No when asked if i wanted to save changes. Unfortunately I hadn't saved the most recent changes before I printed the document. Is there any way to recover the printed version of the document? Scan in the paper copy?? If you didn't save it, there's nothing to go back to. Richard AH wrote: > > I created a large Excel spreadsheet, saved it at various stages, and then > printed the...

Make excel so it can be printed off, chart and all.
I do our monthly budget on excel and would like to print it off chart and all, how do I do that without cut and pasting it into Microsoft Word then print it. If the chart is embedded on a worksheet, it should print when you print the worksheet. If it's on a chart sheet, you could print that sheet separately. Or, move the chart to a worksheet, and print it there. To move a chart, right-click on it, and choose Location. Select one of the options, and click OK Dove wrote: > I do our monthly budget on excel and would like to print it off chart and > all, how do I do that without c...

Two sided printing with a mail merge data source
I have a 2 pages document with mail merge data source and the 1st page is letter head layout and the 2nd is plain. The problem I encountered is when I print it via a duplex printer by two sided printing operation that only the 1st and 2nd page were printed as two sided printing. Any suggestions? Check your page layout paper settings for a start. Otherwise the issue is probably a reflection on how the printer driver interprets the paper command when you have different headers. You may in a worst case have to conditionally insert the header and have the same header running throu...

2003 Publisher--keeps printing layout in portrait instead of lands
Help, please! I'm a new publisher user...i'm doing a basic 3-fold brochure layout, the template layout is in landscape orientation. everything looks great on the screen and in print preview, but when i go to print it, the page changes to portrait!!! I've tried changing it to landscape in page setup and it's still doing it. Any suggestions? thank you!! You want to set the File Print setup in the orientation the paper feeds through the printer, i.e., portrait. You can have the Page setup in landscape and the Print setup in portrait; the normal way when ...

I want print excel sheet with nos in the back ground, as shown in.
How I take a print out of an excel sheet with the numbering in the background of the centre of the sheet,which ih shown in the page break preview. Make the numbering @ the bottom of the sheet by Header & Footer I can manage. Hi this is not supported by Excel as built-in feature. You'll have to create a macro for doing this -- Regards Frank Kabel Frankfurt, Germany soory wrote: > How I take a print out of an excel sheet with the numbering in the > background of the centre of the sheet,which ih shown in the page > break preview. > Make the numbering @ the bottom of the ...

How can i increase the field length?
How can i increase the field length? I want to increase the length of inventory item category i.e 12 in GP 10 You can't increase the length of fields in GP. -- Charles Allen, MVP "Rizwan Ahmed" wrote: > How can i increase the field length? I want to increase the length of > inventory item category i.e 12 in GP 10 > > > As Charles mentioned, you cannot change tables in GP. You could look at customising the system with Extender, Dexterity or Modifier/VBA to add new fields of a greater length. David Musgrave [MSFT] Senior Development Consultant Escal...

Printing strange shape
I still need help with this problem! I checked the footer but don't see anything, however, I set the bottom margin to .5 and changed the footer to .75. Now the shape doesn't show up or print. But, I'd still like to know where it came from and how to really get rid of it - someday I might want to print a footer! >-----Original Message----- >Have you looked to see what is in the footer? >File|PageSetUp|headers&footers >Bernard >"Coyote" <anonymous@discussions.microsoft.com> wrote in message >news:082901c3d39d$365ce650$a601280a@phx.gb...

default printing in Excel
I know this a very basic question, but I can't find the answer! How do I change the print setup defaults in Excel? A little too basic. There are some defaults that can be altered by setting up a workbook as you wish then saving it as a New Workbook Template or as a New Worksheet Template. Post back with more specific needs. Gord Dibben Excel MVP - XL97 SR2 & XL2002 On Fri, 18 Jul 2003 06:44:14 -0700, "kenw100" <kenw100@yahoo.com> wrote: >I know this a very basic question, but I can't find the >answer! How do I change the print setup defaults in &g...

A picture is printing that does not show on the screen
When I print my document a picture prints, but I can't find it in my document. I don't want it to be anywhere in this document. camsnanny <camsnanny@discussions.microsoft.com> was very recently heard to utter: > When I print my document a picture prints, but I can't find it in my > document. I don't want it to be anywhere in this document. Do you have watermarks turned on in your printer driver? Is the picture on the Master Page? Press Ctrl+M to check. Is the picture in the Scratch Area? Zoom out and scroll around. -- Ed Bennett - MVP Microsoft Publisher ...

merged print names 4 up post card
USING PUBLISHER 2000 - The merged print dialog box does not provide a selection for print side 1, print side 2 separately (instead printing side 1,2 side 1,2 etc,) I desire to print the clients <<first name>> (as in dear <<first name>>) on side 1, and mailing address <<first name>>,<< last name>>, <<address>>, etc. on side 2. I did follow the site instructions to create two separate files - but names will not line up on the 4 up post card. I do not have a duplexing unit on my HP8550 printer, so I must flip the stack over and ru...

How do I get the email address to print on a draft copy?
In outlook express, when you print a draft copy it shows the receiptient, how can I do this in outlook? Turn off Word as your email editor before you create the message.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =20 "Sarah" <Sarah@discussions.microsoft.com> wrote in message = news:D938CEEF-FE1D-4EDF-9341-E0DFD3F950CC@microsoft.com... &...

Force XmlSerializer to use explicit closing tags for zero-length strings?
Greetings, I am using the .Net Framework XmlSerializer to serialize a class that contains some string properties. The problem is that when a string contains a zero-length string ("") it is serialized as: <foo /> When what I would really like is: <foo></foo> Now I know the former is well-formed and all, but I really need the explicit closing tag. The XML file will be read by another system (out of my control) that requires the explicit closing tag. Any ideas here? Thank you. Regards, Scott Ballard <scott.ballard@gmail.com> wrote in message news:111...

how do I print data in a spreadsheet data base to a mailing lable.
I would lik eto take the data from a customer data base in Excell and print each customers information on a mailing lable can this be done? should I use Access? if it can be done please help me. I currently am using Microsoft Office 2000 You could use Word's mail merge feature to create the mailing labels. There's mail merge information on the Word MVP site: http://www.mvps.org/word/FAQs/MailMerge/CreateAMailMerge.htm And David McRitchie has instructions on his web site: http://www.mvps.org/dmcritchie/excel/mailmerg.htm Kevin Jamieson wrote: > I would lik eto ...

Offset text print problems
recently all of my excel documents are printing the text offset from the gridlines. I have checked through every setting I can think of and am having no luck. I have even changed the font I am using. Any ideas on why this is happening and or how to fix it ? I have no idea, but I'd start with the printer driver. Either get a fresh or new driver from your printer's manufacturer. You may even want to try it on a different printer to see if that makes a difference. IMC Techie wrote: > > recently all of my excel documents are printing the text offset from the > gridlines....

How can I print email without the date on the header and footer?
Already disabled the text in header and footer of outlook and IE. Thanks You can't, not using outlook's printing capabilities. see if http://www.outlookprinter.com/ does what you need. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Subscribe to ...

Printing headers #2
We have just installed the latest verion of Office When printing out my e-mails I cannot get the header to print We have checked out all areas but cannot find out why it will not print ...

exclude some address labels from printing
My access database table has been used to design address labels. How can I exclude only some of those records being printed? One approach would be to add a Yes/No field to your underlying table and "turn off" the ones you don't want to use. A simple query will leave those out - base your report (mailing labels) on the query. Regards Jeff Boyce Microsoft Office/Access MVP "Geoplay" <Geoplay@discussions.microsoft.com> wrote in message news:F488C4B8-622E-4790-9276-ACF21948E92B@microsoft.com... > My access database table has been used to design address lab...

How can I get Excel to NOT collate when printing. Unchecking col.
I print 2 copies of a form and prefer to have the copy directly behind the original. I uncheck the collate button and it shows "11, 22, 33" but it still prints in collate form. I did not have this problem when I used MSWorks. I have tried checking print pages instead of all pages and it still collates. I can tell it to print one page at a time and it works but more than one page will be collated. Can you use a macro that just prints page 1 multiple times, then page 2, and so on. If your printer spits out header pages, you may not want to use this (10 pages x 20 copies mean...

Restrict or prohibit exporting records to Excel and printing privi
What workaround can I possibly take to restrict MS CRM v1.2 users in exporting records to MS Excel as well as prohibit them with print privilege? ...

printing issue
Hello, This is a crosspost that i also posted in excel.printing. I am having this weird issue in excel 2007. I would create a relatively long worksheet (one that would end up being 10 - 15pgs) and with in this worksheet there would be text and pasted pictures. Now the picture would be followed by a description underneath. All the picture would be sized about the same and all the cells are default and not adjusted at all. The text is default size also. The margins and everything are set the same. Now the issue is this, on excel normal view or page break view everything loo...