Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Printing Rows Conditionally.

Printing Rows Conditionally

Written by Allen Wyatt (last updated March 28, 2020)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


Rune has three columns, A through C, that contain data. Column C contains either blank (nothing) or the letter X. Rune wonders if there is an easy way for him to print only those rows that have an X in column C.

There is a very easy way to do this. Assuming that you have a header row in row 1, follow these steps:

  1. Select any cell in the columns.
  2. Make sure the Data tab of the ribbon is displayed.
  3. Click the Filter tool, in the Sort & Filter group. Excel displays small drop-down arrows beside the header row cells.
  4. Click the drop-down arrow for column C and select only the X. Excel filters the data so that only those rows that have an X in column C are displayed.
  5. Print your worksheet as you normally would.

That's it; the filtered worksheet is printed and only those rows with an X in column C are on the printout. You can, if desired, remove the AutoFilter after printing. When your data changes and you need to print again, just follow the same steps once more.

Another way to do the printing (if you don't want to use a filter for some reason) is to simply sort your data according to the contents of column C. If you sort in descending order, then all the rows containing an X in column C will be at the top of your worksheet. Select those cells and define them as your print area. When you then print, only those rows with an X in column C are printed.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8933) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Printing Rows Conditionally.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Creating Thin Spaces

Thin spaces are a typographic device that allows you add a bit of space between elements of a document. There are no thin ...

Discover More

Understanding Subroutines

The heart of creating powerful programs in VBA is to understand how to create subroutines. These structures allow you to ...

Discover More

Switching Windows in a Macro

When you have multiple workbooks open at the same time, Excel allows you to easily switch between those workbooks. How ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Defining a Custom Paper Size

Need to print your worksheet on a non-standard paper size? Excel is rather limited in printing to such papers, and here ...

Discover More

Printing Only Non-Blank Worksheets

If you have a workbook containing many worksheets, you might want to print only those worksheets that have some sort of ...

Discover More

Printing a Chart

It is inevitable that if you spend time creating a chart you will want to print that chart on your printer. Here's how ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four minus 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.