How do I print only the cells I need?

G

Guest

I am using Excel 2003, I would like to print only the names, addresss. Is it
possible to sellect only what you need and print it, from the cells?
 
G

Glen Mettler

If you want to do it from a macro, do this:

'build MyRange

Range(MyRange).Select
Selection.PrintOut Copies:=1, Collate:=True

otherwise, select the cells you want to print with the mouse. Select File -
Print
In the dialog box select "Selection" then print

Glen
 
M

Myrna Larson

Have you tried to print yet? In the Print dialog, you should notice the option
to print the selection.

If the cells aren't contiguous, you can always hide rows and/or columns.
 
J

Jim May

Here's something of interest;
Requirements:
1) Column Z should be empty
2) Before running first of two macros -- click on #1 cell, then hold down
the control key and continue to click of any number of additional cells,
up to 20 (say for example).. Once you've select then:
3) Run Macro:

Sub CellsToGrabUp()
i = 0
Set rangeToUse = Selection
If rangeToUse.Areas.Count = 1 Then
rangeToUse.Copy Destination:=Range("Z1")
Else
For Each singleArea In rangeToUse.Areas
i = i + 1
singleArea.Copy Destination:=Cells(0 + i, 1)
Next
End If
End Sub ' the selected cells will be listed in Z1:Z20
4) Run Macro:
Sub CellsToPrint()
Dim Lr As Integer
Lr = Cells(Rows.Count, 26).End(xlUp).Row
ActiveSheet.PageSetup.PrintArea = "Z1:Z" & Lr
ActiveSheet.PrintPreview ' change PrintPreview to PrintOut if
hard copy desired
ActiveSheet.PageSetup.PrintArea = ""
End Sub

HTH,
JMay
 
J

Jim May

Whoops!!!
Change line below >>> singleArea.Copy Destination:=Cells(0 + i, 1)
to:
singleArea.Copy Destination:=Cells(0 + i, 26)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top