Free VBA Tip: How To Print Each Row/Cell On A Separate Page In Excel? – Excel VBA
1 Min Read
Open Excel VBA
Open the Microsoft Visual Basic for Applications window.
Insert > Module
Paste the following code in the window:
Dim Rng As Range
Dim WorkRng As Range
Dim xWs As Worksheet
On Error Resume Next
xTitleId = "SelectRange"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Set xWs = WorkRng.Parent
For Each Rng In WorkRng
xWs.PageSetup.PrintArea = Rng.EntireRow.Address
Press F5 to run the code, and that’s it, a preview window will open so you can preview or print as you see fit.