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

Filtering for Comments

by Allen Wyatt
(last updated September 3, 2016)

2

Robert has a worksheet that has comments included in various places. He wonders if it is possible to filter the rows in a data table so that only those rows that include comments in a particular column are displayed.

The filtering capabilities of Excel don't provide a way that you can automatically check for the presence of comments, but there are a couple of ways you can approach a solution. One possible solution is to follow these general steps:

  1. Make a copy of the column that contains comments to be filtered.
  2. Select the duplicate column.
  3. Press F5 to display the Go To dialog box. (See Figure 1.)
  4. Figure 1. The Go To dialog box.

  5. Click Special. Excel displays the Go To Special dialog box. (See Figure 2.)
  6. Figure 2. The Go To Special dialog box.

  7. Click the Comments radio button and then press Enter. Only those cells containing comments are selected.
  8. Type any number, character, or phrase not already present in the column.
  9. Press Ctrl+Enter. All the selected cells (those with comments) should now contain what you typed in step 6.
  10. Use AutoFilter to display only those rows that contain whatever you typed in step 6.

If you prefer, you can create a user-defined function that will let you know if a particular cell has a comment associated with it. The following is a simple way to make such a determination:

Function CellHasComment(c As Range)
    Application.Volatile True
    CellHasComment = Not c.Comment Is Nothing
End Function

Now you can use a formula such as the following within a worksheet:

=CellHasComment(B2)

When the formula is executed, it returns either True or False, depending on whether cell B2 has a comment or not. You can then use Excel's filtering capabilities to display only those rows that have a True returned by the formula.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11232) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Filtering for Comments.

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

Inserting a Page Number Field

The PAGE field is used to indicate the current page number on which the field occurs. If you want to add this field to your ...

Discover More

Spellchecking Words with Superscripts

Adding a superscript to a word is necessary for many types of writing. Doing so, however, can confuse the spell checker in ...

Discover More

Understanding Font Styles

Fonts, by default, come with one or more styles that define variations of how that font is displayed in your document. ...

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)

Printing Comments

Comments can be a boon when you want to annotate your worksheets. If you want, you can instruct Excel to print the comments ...

Discover More

Placing Formula Results in a Comment

Excel won't allow you to directly or automatically insert the results of a formula into a cell's comment. You can, however, ...

Discover More

Finding and Replacing Text in Comments

Excel allows you to add comments to individual cells in your workbook. Unfortunately, Excel doesn't provide a way to search ...

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 7 + 6?

2016-09-06 16:57:43

Neil

Great tip, thanks Willy and Allen!


2016-09-04 05:18:48

Willy Vanhaelen

It can be done without a helper column:

1) Select the column that contains comments to be filtered.
2) Follow steps 3) tot 5) of the tip
3) Fill the selected cells with a color of your choice
4) Filter the column by this color

If you dont like the colors to be permanent you can easily remove them after you are done.


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.