Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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

by Allen Wyatt
(last updated September 27, 2017)

7

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, and 2013. 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

Printing a Bookmark List with Contents

Bookmarks can be a great tool in Word, allowing you to easily remember the location of desired blocks of text. If you ...

Discover More

Defeating Automatic Date Parsing

Excel is continually trying to figure out what type of data is being stored in a cell. If it can interpret a value as a ...

Discover More

Creating a Split Page

In WordPerfect terminology, a split page allows you to put information side-by-side on opposite halves of the page. If ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Controlling the Printer in a Macro

Need to access the advanced capabilities of a printer from within an Excel macro? You may be out of luck, unless you ...

Discover More

Printing a Short Selection

Need to print just a portion of a worksheet? It's easy to do if you follow the steps in this tip.

Discover More

Printing Multiple Worksheets on a Single Page

Got a bunch of worksheets and you want to save paper by printing multiple worksheets on a single piece of paper? There ...

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}] 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 4 - 0?

2017-09-27 05:30:38

Mark

Keyboard shortcut for turning the filter on or off when the cursor is in the table: Ctrl-Shift-L

Keyboard shortcuts for Speed!


2017-09-27 03:44:52

Surendera M. Bhanot

another way to go about that is to format the data as "Table" (Insert > Pivot Tables & Tables > Table). You will find the down arrows on all the columns of the Header row. click that arrow and select (one, more or all) what you like to appear (X in your case). Click okay and you are done. Print as normal. After that clear the selection to come back to entire table.


2016-05-18 02:01:41

Kashif

i have similar problem. i have a specification format with number of pre-defined item but in every specification, there are number of empty rows i.e. in few articles, we use 3 leathers & in some 1 or 2 leathers, i want to know for the article with one leather, how can i skip empty rows of leather 2 and leather 3.


2015-10-25 04:00:37

venkatramanan

Sir, I need every page last line (row last) to be print in the next page top row.

kindly help in this urgent please.


2015-07-22 06:44:41

Nik Red

Dear Allen

What if there many columns that need to be sorted?


2015-06-15 12:32:07

jenn r

Super tip. Concise, accurate & straightforward. Thank you.


2014-09-23 13:31:52

Aamir Ali

sir i need some help about Data Validation, Filter and printing of multi cells like bill of different people of same colony... my English is not too good i apologies for any mistake.


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.