Skip to main content

How to print only rows /cells with data in Excel?

When printing a range or a worksheet in Excel, some blank rows or blank cells are also printed out and take up spaces in papers. This article is talking about how to ignore all blank rows/cells and only print rows/cells with data in Excel.

Print only rows with data by VBA in Excel

Print only rows with data by removing blank rows in Excel

Print only cells with data by copying cells with data to a new sheet in Excel

Batch print multiple nonblank rows with ignoring empty rows in Excel

Kutools for Excel's Print Multiple Selections Wizard can help you not only print multiple selections from the same worksheet easily, but also print multiple ranges from many worksheets easily.

ad print multiple selections 2


This method will introduce a VBA to quickly print rows with data only in a specified range in Excel. Please do as follows:

1. Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and then copy and paste the following VBA code into the new opening Module window.

VBA: Print only rows with data in Excel

Sub PrintSummary()
Dim xRg As Range, xRg1 As Range, xCell As Range
Dim xSht As Worksheet
Dim xTxt As String
On Error Resume Next
xTxt = ActiveWindow.RangeSelection.Address
Set xRg = Application.InputBox("Please select the range to print:", "Kutools for Excel", xTxt, , , , , 8)
Set xRg = Application.Intersect(xRg, ActiveSheet.UsedRange)
If xRg Is Nothing Then Exit Sub
If xRg.Areas.Count > 1 Then
MsgBox "You can't select multiple selections", , "Kutools for Excel"
Exit Sub
End If
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set xSht = Worksheets.Add(After:=Sheets(Sheets.Count))
xRg.Copy xSht.Range("A1")
Set xRg1 = xSht.Range("A1").Resize(xRg.Rows.Count, xRg.Columns.Count)
For Each xCell In xRg1.Columns(1).Cells
If Application.WorksheetFunction.CountA(xCell.EntireRow) = 0 Then
xCell.EntireRow.Hidden = True
End If
Next
xSht.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
xSht.Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

3. Press the F5 key or click the Run button to run this VBA.

4. In the opening Kutools for Excel dialog box, specify the range that you want to ignore blank rows and only print rows with data, and click the OK button.

Then the specified range is printed immediately with ignoring all blank rows in it.

Note: This VBA does not support batch print multiple selections with ignoring blank rows.


This method introduce Kutools for Excel’s Delete Blank Rows utility to delete all blank cells in active worksheet or selected range, and then print those rows with data only in Excel. Please do as follows:

Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy a full-featured 30-day FREE trial with no credit card required! Download now!

1. Go to the worksheet you will print rows with data only, and click Kutools > Delete > Delete Blank Rows > In Active Sheet. See screenshot:

Note: For printing rows with data only in a specified range, please select this range firstly, and then click Kutools > Delete > Delete Blank Rows > In Selected Range.

2. A Kutools for Excel dialog box will pop up and show you how many blank rows have been deleted. Click the OK button to close it.

And now you will see all blank rows are deleted from the active worksheet/selected range. See screenshot:

3. Click the File (or Office Button) > Print to print only rows with data in active worksheet or selected range.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now


Sometimes, you may want to print cells with data only with ignoring all blank cells in Excel. This method will introduce Kutools for Excel’s Select Nonblank Cells utility and Print Multiple Selections Wizard to only print cells with data in specified range in Excel.

Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy a full-featured 30-day FREE trial with no credit card required! Download now!

1. Select the range where you will only print the cells with data, and click Kutools > Select > Select Nonblank Cells. See screenshot:

2. A Kutools for Excel dialog box comes out and show you how many cells with data have been selected. Click the OK button to close it.

3. Keep selecting these nonblank cells, and click Enterprise > Printing > Print Multiple Selections Wizard. See screenshot:

4. In the opening Print Multiple Selections Wizard dialog box, you will see all selected nonblank cells are listing in the Ranges to print list, please click the Finish button.

5. Now all selected nonblank cells are copied and pasted as linked pictures in a new worksheet. Please click File (or Office button) > Print to print these cells with data.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now


Kutools for Excel: Over 300 handy tools at your fingertips! Start your 30-day free trial with no feature limitations today. Download Now!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations