• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to create a customized report on my excel

athan00

New Member
Hi
i ve got this simple excel. What i m looking for is how to create a PRINT button so to print the following data depending on which row of the excel sheet is currently clicked (or selected(?).... i m not sure how this could work. or if it is possible to be a PRINT button on every row if possible)

Data i m looking at is something like

NAME
RECEIVE DATE
NUMBER OF ITEMS
DISCOUNT
TOTAL COST

Thanks

Athan
 
Hello Athan,

You can set print area in excel. For example, attached is the file where the print area is set as =Sheet1!$B$2:$F$15.

Alt+P+R+S is the shortcut key to set print area after selecting whichever you want for printing.

You can check the print area being set by using shortcut key Alt+M+N to go to named ranges and see the range of print area which we have set.

Regards,
Pavan.
 

Attachments

Code:
Option Explicit

Sub SelectPrintArea()
Dim PrintThis As Range
ActiveSheet.PageSetup.PrintArea = ""
Set PrintThis = Application.InputBox _
(Prompt:="Select the Print Range", Title:="Select", Type:=8)
PrintThis.Select
Selection.Name = "NewPrint"
ActiveSheet.PageSetup.PrintArea = "NewPrint"
ActiveSheet.PrintPreview
End Sub

Paste into a routine module. Put commandbutton on sheet attached to macro.

Asks for range to print, you use mouse to highlight the range.
 
Back
Top