Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

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

Author Kelly Last modified

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


Print only rows with data by VBA in Excel

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.

a screenshot of selecting a range you want to print after running the code

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.


Print only rows with data in Excel

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 permanently free AI features! Download now!

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

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.

a screenshot showing how many rows ae successfully deleted

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

a screenshot showing the original data range and the final data range after removing blank rows

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 permanently free AI features! Get It Now


Print only cells with data in Excel

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 permanently free AI features! Download now!

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

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.

a screenshot showing how many rows ae successfully deleted 2

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

a screenshot of enabling the Print Multiple Selections Wizard feature of Kutools

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.

a screenshot of selecting all non-blank cells

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 permanently free AI features! Get It Now


DemoPrint only rows/cells with data

 
Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Related articles:


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
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

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...


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!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in