If you change your mind at a later point, you can clear the print area or change it. Defining a print area gives you more control over what each printed page looks like and, ideally, you should always set a print area before sending a worksheet to the printer.
Without it, you may end up with messy, hard to read pages where some important rows and columns are cut off, especially if your worksheet is bigger than the paper you are using. To instruct Excel which section of your data should appear in a printed copy, proceed in one of the following ways. A faint gray line will appear denoting the print area. Want to visually see all your settings?
Here's a more transparent approach to defining a print area:. When you want a hard copy of a whole sheet or entire workbook but do not want to bother clearing all the print areas, just tell Excel to ignore them:. The ability to print multiple areas per sheet of paper is controlled by a printer model, not by Excel. If your printer has such an option, lucky you are : If there is no such option, then the only way I can think of is copying the print ranges to a new sheet.
With the help of the Paste Special feature , you can link the copied ranges to the original data in this way:. In case you have a lot of worksheets with exactly the same structure, you will obviously want to output the same rage on paper. The problem is that selecting several sheets disables the Print Area button on the ribbon. Luckily, there is an easy workaround described in How to print the same range in multiple sheets. If you have to print the same area on multiple sheets regularly, the use of VBA can speed up things.
This macro automatically sets the print area s for all selected worksheets the same as on the active sheet. When multiple sheets are selected, the active sheet is the one which is visible when you run the macro.
No matter how many sheets you have, this code defines the print range in a whole workbook in one go. Simply, set the desired print area s on the active sheet and run the macro:. When working with different workbooks, you may find it convenient if the macro prompts you to select a range. Here's how it works: you select all the target worksheets, run the macro, select one or more ranges when prompted to select multiple ranges, hold the Ctrl key , and click OK.
The easiest way is to download our sample workbook with Print Area Macros and run a macro directly from that workbook. Here's how:. Alternatively, you can save your file as a macro-enabled workbook. Accidentally included irrelevant data or missed selecting a few important cells?
No problem, there are 3 easy ways to edit print area in Excel. If you want to learn other properties, click here. Your email address will not be published.
Save my name, email, and website in this browser for the next time I comment. Public Sub printArea Application. I added marginpx so that it covers main 's border as well. Just make sure that printarea has a background and you should be good to go. The problem with what you want to do I that you're trying to hide the parent, and show the child. If you could wrap that text in a paragraph or span, then you could do something like. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Limit print area to a div Ask Question. Asked 8 years, 1 month ago. Active 8 years, 1 month ago. Viewed 31k times. Improve this question. Community Bot 1 1 1 silver badge. Nick Grealy Nick Grealy Add a comment.
0コメント