Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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. Full Feature Free Trial 30-day!

ad print multiple selections 2

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.


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:

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 - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, 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.

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 - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now


Kutools for Excel includes more than 300 handy tools for Excel, free to try without limitation in 30 days. Download and Free Trial Now!


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.