Email:      Pass:    Pass?
Advertisements


Free Excel Forum

Can I Print Selected Cells Only Within A Worksheet

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

I have designed a simple template using text only for a unique advice note. I
want to be able to add variable information within this template but need
only for the variable information to print onto a pre-printed advice note. I
do not want to hide the template as I need to see exactly where to insert the
variables but I do not want it to print. Anyone help? Thanks.



Similar Excel Video Tutorials

Helpful Excel Macros

Print Preview Display for Specific Worksheets in Excel
- This free Excel macro allows you to display the print preview mode or window in Excel for a specified Excel worksheet.
Print Specific Pages in Excel
- This free Excel macro allows you to print a pre-specified selection of pages from Excel. This means you can print 2 pag
Print Selected Worksheets in Excel
- This free excel macro will print all selected worksheets in Excel. If there are no other worksheets selected the active
Print The Current Worksheet in Excel
- This free Excel macro will print the current active worksheet in Excel. This means that whatever sheet you are currentl
Complete Guide to Printing in Excel Macros - PrintOut Method in Excel
- This free Excel macro illustrates all of the possible parameters and arguments that you can include in the PrintOut Meth

Similar Topics







I am trying to build a macro to work with a template file.
The template file has set sheet numbers and names (with one exception, see 4) below).
There are close to 40 sheets in all.
Some sheets are never printed.
Some sheets are always printed.
Many sheets are printed only if they are used.
Most of the sheets are 'break out' sheets and a variable number of them will be used.

So... Here is what I'm trying to accomplish.

1) Always print Sheet4(Overview1)
2) Always print Sheet6(Overview2)
3) Print Sheets 11 thru 40 IF value in cell G50 on these sheets is > 0. Note that this cell has a name (Total) and I would like to reference the name if possible. (It could happen that further evolution of the Workbook moves the cell up or down a row.)
4) Print Sheet38(Data Sort) IF it exists. Otherwise, print Sheet1(Data).
If the information on the Data sheet is limited (eg only 1 or 2 pages), we print it off directly. If the information is more extensive, we copy it to a new sheet and sort it (Data Sort).

I can achieve 1) and 2). I'm not quite sure how to go about 3) as I'm still not very good with macro loops. 4) I haven't tackled yet.

Any help appreciated.


I have set up a form (template) and print it out. I want to fill out the form on the template, but only print those cells where information is requested. The printed form will be inserted into the printer. I have tried a2+a3, etc., a2, a3, etc. I have tried view page break and marked those cells to be printed. Nothing seems to be working.


Hello - I have a excel template that I have formulas up to row 1000. The downside to this is that when I create a new document with only 5 rows for example using the template, when I print, it wants to print 27 pages because of all the formulas in the cell. Is there a way on a template to tell it to only print when there is data in a certain field? or ignore cells with formulas when printing?

Thanks you in advance.


Ok I did some searching and didn't find much for helping with the problem I have.

I currently have a template that I have made and all the info and everything is fine on it, but the problem is with printing. Every time I go to print it wants to print out 100 copies of the same thing. I tried editing the original template by printing 1 copy then saving the template, but it still wants to print 100 copies with the next try.

Does anyone know how to customize what the print settings are for the template and make them stay permanent with the template?

Thanks in advance, its just annoying when I want to do a quick print and it starts spitting out 100 copies of the same thing.


I have a spreadsheet with multiple rows of client/customer information. The number of rows varies on a day-to-day basis from 25 to 200 rows. I have a single invoice template that requires to be printed on a daily basis. I don't want to create a worksheet for each client as this will take too much time.

I need to create a print macro for the template that will print an invoice for each client?

My client information is layed out as follows (for example):
Row 1 Name: Smith Amount owed: $20.85
Row 2 Name: Adam Amount owed: $28.34
Row 3 Name: Toms Amount owed: $26.38
and so on

In the Template, I want to print an invoice for each client. So invoice 1 is Smith and amount owed is $20.85; invoice 2 is Adam and amount owed is $28.34; invoice 3 is Toms and amount owed is $26.38 and so on.

So when printing the template, I need the value in selected cells to update to new client information each time.

I hope this explains what I am trying to accomplish. Any help is appreciated.


Hello experts and members!

I'd appreciate some assistance with an issue I'm having with Excel.

I have an issue with a client invoice system I’m trying to create on Excel 2003.

I have created an invoice template, but the data such as Client Name, Address, Monthly Billing are all variables stored in a different worksheet in a list.

Each row of this customer list contains information for each of many clients.

The issue comes in when I want to figure out how I can expedite printing invoices for several clients at the push of one button.

There is one worksheet that serves as a template, but upon print command, I would like this template to look through the client list and search for rows that are checked with a checkmark and print only those selected clients.

If I select 10 clients out of 100, it would be great to print 10 invoices at the push of a single button using data stored in the client list worksheet.

I’m assuming that this is a fairly difficult task. Is it even possible?

I’d appreciate any help I can get, including which related sources I can see and study from it even.

Thank you very much.

Please see the attached file.


Hi there,

I have a macro that does the following bit of code a number of times:


'Print Vic Consolidated
Sheets("New Template").Select
Range("h4").Select
ActiveCell.FormulaR1C1 = "29"
Sheets("new KPI").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=8, Collate:=True

Note: The ActiveCell.Formula is a variable, and changes from 1 to 29 according to the report that is run. The macro just changes the number to print out groups of reports (eg. 4, 5 , 6, 7 and 8 )


The thing I want to know is:

Can I make the number of Copies a variable as well???

As in, is it possible to do some sort of drop down menu when someone pushes the inital Print Macro button...how do I make it ask how many copies to print?

.......how do I build this in???


Thanks

Greg


I want to create a spreadsheet that will house and print out groups of data
imported from another source. I have created a template and imported one set
of data which I then printed out, but am having trouble importing the next
set of data I want to print out in the same format.

Basically, I have report information that isn't set up in a printer-friendly
format. I want to import the data into Excel and select certain of the
fields to print. Since I need to print these reports daily, I want to
memorize the spreadsheet so I don't need to keep recreating it.



I would like to use a "for - next" or "while" loop to print out sufficient template sheets that have had new dates incorporated for the month.
Days and dates are pulled into Row/Column BK2 to BL33. These days/dates are then placed into the template at b1 and k1 ie b1 references bk2 for day k1 references bl2, for date.
this is then printed out and the references changed to next row down ie b1 now references bk3 and k1 references bl3 etc printed then next reference. until 25 rows have been printed, which leaves me with some wasted sheets dated for eg thurs 33rd march.
so to the next point
can a date range check be done so that only the needed dates are printed and cherry on the top public holidays excluded along the lines of......
while bl?? < (Monthlastdate) and bl?? does not equal holiday insert day into b1 and date into k1 print sheet, next

Hope some-one can help out
Thanks
Shawn


This is in Excel 2007!

As you will see in the attachment I have set up a template. Now I need to print specific cells in the worksheet and they need to appear in the exact same location on the printed page as they do on the worksheet currently. I've tried setting a print area but it doesn't seem to be working. Not sure if I'm doing something wrong?

The cells that need printing are

$I$5,$J$5,$K$5,$L$5,$M$5,$N$5,$P$5,$Q$5,$R$5,$S$5,$T$5,$A$9,$U$7,$U$15,$P$16,$O$16,$N$16,$M$16,$L$16 ,$K$16,$G$20,$G$21,$AF$20,$AG$20,$AI$20,$AJ$20,$AL$20,$A$25:$AL$26,$A$30:$AL$31


I have a macro that is set to vlookup a name, populate a fields on a 1 page template and then print the template based on the vlookup. When I run the macro 150 names are looked up via the vlookup and 150 print jobs are printed out.

I would prefer to have the print job printed to 1 pdf document with 150 pages, however, when I print to pdf I have save each page as a seperate file and then combine all pdfs into 1 file. Is there a way I can get this into 1 file without all the renaming and merging of files?


Hi all, Can anyone help please. I have the following macro which runs based on a selection of 'Y' or 'N' in an excel spreadsheet which opens a word doc from a word template. My question is how can this be changed to open the word doc based on the template, but close the template. Currently when you save the new document, it also asks if you wish to save ythe template(basically overwrite)


Sub GetWordDocument()
Dim oWordApp As Object
Dim oDoc As Object
Dim sFilename As String

Set oWordApp = CreateObject("Word.Application")
If Range("G3").Value = "Y" Then
sFilename = "M:\001_Quality\Manual advice Notes\Template\ST011AFO Issue 1 Advice note AND Customs invoice.dot"
Else
sFilename = "M:\001_Quality\Manual advice Notes\Template\ST011FO Issue 4 Manual Advice Note.dot"
End If
Set oDoc = oWordApp.Documents.Add(sFilename)
oWordApp.Visible = True
Set oDoc = Nothing
Set oWordApp = Nothing
End Sub


Private Sub CommandButton1_Click()

End Sub

THANKS ALL


My boss handed me a project that I think is possible with Excel, but may be better handled with Access or any one of a hundred other billing software programs.

On a worksheet (in the print area) I need to make a data overlay for three identical invoices. I’d do this by tweaking the row and column spacing and cell alignment. This is so when our preprinted invoice forms are printed, our current information is inserted into the blank placeholders.

Below these three invoice templates (and out of the print area) will be rows, each with unique companyname/address and account number data.

We need Excel to take the first row of data and insert it into to proper placeholders (cells) on the top invoice template.

Then the next template would receive data from the next row and the third template would receive data from the third row. I can do all of the above myself with my limited knowledge of Excel.

The problem is that we have close to 500 of these to print each month, so we need some way to pour the corresponding data into each of the three invoice templates while printing and then auto-increment/insert for printing data rows 4,5,6 then 7,8,9 etc.

I’m very familiar with Access but not Excel but I have no choice in the matter, it has to be in Excel.

Any help would be appreciated. Go easy on me though, as I have very little experience with VBA.

fish


Could anyone help please, I have an excel spreadsheet, which depending on a 'controlled selection' in a cell (Y or N), we have a macro which selects the approripate
word template to open. When you 'create new' from a template in word .dot it should open a .doc file from the template. However the macro is simply opening the template, not openining a 'new .doc file' from the template. Can anyone help!!!

Code:

Sub GetWordDocument()
Dim oWordApp As Object
Dim oDoc As Object
Dim sFilename As String

    Set oWordApp = CreateObject("Word.Application")
    If Range("G3").Value = "Y" Then
        sFilename = "M:\001_Quality\Manual advice Notes\Template\ST011AFO Issue 1 Advice note AND Customs invoice.dot"
    Else
        sFilename = "M:\001_Quality\Manual advice Notes\Template\ST011FO Issue 4 Manual Advice Note.dot"
    End If
    Set oDoc = oWordApp.Documents.Open(sFilename)
    oWordApp.Visible = True
    Set oDoc = Nothing
    Set oWordApp = Nothing
End Sub


Private Sub CommandButton1_Click()

End Sub


[Added code tags~VP]


Hi

I have a customer database for specific contact details and instructions. The user can use filters to sort by branch, customer etc and then mark the selected customers he wants to printout.

Problem is, is that that the data layout within the worksheet is not a clear layout and as the number of printout entries will always be variable, is there a way I can print to a template a bit like labelprint software. Any help appreciated.


How do I setup a print macro button that will set the print range down to the last "non-blank" cell in column A? The columns I need printed are A-I and I want to print my titles/column headings from rows 1-4 on each page.

My template has data or other information in some of the other columns in the first 500 rows, but I only need to print through the last row in which column A has any data. I need it to figure out the last row each time it is printed to avoid printing blank pages.

Hopefully that make sense.


I downloaded the Price Sheet template from the MSN site (Excel template),
filled it in to line 144, but it only prints out to line 125. How do I get
the rest of the information printed?



I have a report that is 12 pages in its entirety. I am using the Page Break view and setting the begining of each page using the page break feature. There are times when this report has no data on pages 4-5 and when I print I only want the pages that contain data (Page 1-10 of 10 instead of page 1-12 of 12).

If I hide the rows that comprise pages 4-5 and then print the report, my page count is still 12 and pages 4-5 are completely blank.

If I remove all the page breaks and hide the cells and then apply page breaks where appropriate, this effectively adjusts the number of pages printed.

My problem is that this report is automatically generated from information that is input on seven other worksheets and is part of a template. This template is used to launch a new data-entry series every week.

I do not want to have to format this report every week. Is there a way to hide pages that use the page break function and not have those pages print with the rest of the report?

-Slave


I'm using VB 6.0 to open an Excel template that's been formatted, and
then plugs in data to the formatted cells.
When I print the primary sheet, everything works great! *However*, how can I print multiple pages where pieces of data change from page to page?
I've tried looping through sheets.add, but if I do that, I lose the formatted
page from the template. In pseudo code, this is what I'd like to do:
1. Open Excel template
2. Place formatted data in A1
3. Print
4. Make a copy of the template (or close/re-open the template)
5. Place *new* formatted data in A1
6. Print
ad infinitum.

Can that be done? Any help at all would be greatly appreciated!


Hi all:

I'm new to VBA. It'd be great if someone can help me with this question.

I have the following code to print a calendar by day. It's done in a template in one worksheet. As such, each loop produces one print job for each calendar day. I want to do duplex printing. How do I structure the codes so that all 365 days can be printed in one print job.

Many thanks
Rebecca

Sub Calendar ( )
Dim i As Integer
For i = 0 To 365
Range ( "I1" ) = DateAdd ( "d" , i, "1/1/2010" )
ActiveSheet.PrintOut
Next i
End Sub


Hi,

I use a macro to replace value on a set template excel page that then prints out. I was wondering is there a way to compile all the prints 70 or so pages into 1 print job rather than to 70 individual print jobs in VBA.

I haven't included the code as it's pretty basic stuff

It selects the template
copies through a certain name that then feeds through all the other information based upon that name via formula.
Then prints
changes the name
and repeats till the name = "".

The only other way I could think of doing it would be to create a copy of the tab template then print all the tabs at once but if anyone does know of any code that could accomplish this without being so resource heavy as to create tabs then enter data and so on, it would be much appreciated.

Thanks


Hi
This may be a simple question, and I suspect I am missing something obvious but it is becomming very frustrating.

I am working in Excel 2007 but saving as a 2003 Template

I have an excel sheet which contains 4 Option Buttons. These show up on screen, they show up on print preview but do not appear when the sheet is printed.

I have set the properties and made sure the "Print Object" button is checked.

These buttons used to print, then I made some changes to the sheet (only additional text and a small macro to automatically insert a number into a cell) and now they do not print.

To make this even stranger, they print from some machines but not others. They used to print from all machines and no settings were changed.

As I said I am sure I am missing something obvious!

Thanks for your help

Sam


I have a master timecard template for my company. At the top of the timecard there is a cell for the Employee name, Employee ID and SSN. I have a separate worksheet in the workbook that has three columns of information. Column A is the Employye name, Column B is the Employee ID and Column C is the Employee SSN. I would like to write a Macro that would insert the Employee name, ID and SSN and print the timecard for each employee. Is there a way to get the macro to insert each employee's information, print the timecard, and then automatically move to the next employee and repeat until all timecards have been printed? I am using Excel 2003 with XP Pro SP2. Thanks.


perhaps I'd be better using Access than Excel, however Excel is more openly available so if this can be done, any help would be appreciated.

I have a table of data. Lets say it 20 rows deep (this will vary however). Each row represents one entry. On a seperate sheet, I have my template (or my incomplete form). The template form can be populated with up to 4 entries from the original table of data.

What I would like to be able to do is set up a system where I can set a print process going where the template is populated with the first 4 entries, a print out occurs, before a its populated with the next 4 entries etc. Kind of like a mail merge within its own workbook.

Is this sort of thing possible, or am I wasting my time trying? Any help is appreciated, and if what I have said is unclear, or more information is required, please ask. Many thanks


I would like to print a template on a big size paper 42 cm * 28 cm with my
printer (manual tray), so that the template fits the size of that paper. It
appears much to small now when I print it, I would like the size of the
template to adjust to the size of the page.

Thank you.