How to select a range and print it automatically using a macro. Watch the video below:
Whenever a user selects the print command, the whole sheet is printed. If we press Ctrl + P to print then we have to perform a manual selection as shown in the image below:

For quick printing we can add the option ‘Quick Print’ to our Quick Access Toolbar (QAT) as shown in the image below:

However, even Quick Print will print the whole sheet and we will have to specify a few steps to print the selected range.
To have a great way to print only the selected data, we could write this useful macro:
Sub PrintSelectedData
Selection.Printout Copies:=1, Collate:=True
End Sub
We have modified the above simple macro to learn some more interesting code as shown in the video above:
Sub PrintMyData()
Dim MyData As Range
On Error Resume Next
Set MyData = Application.InputBox(prompt:=”Select Range”, Type:=8)
If MyData Is Nothing Then Exit Sub
MyData.PrintPreview
‘MyData.PrintOut copies:=1, collate:=True
End Sub
If we wish to print all cells with data then we can use the following macro code:
Sub PrintSelectedData
ActiveSheet.UsedRange.PrintPreview
End Sub