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: Counting Comments in a Worksheet.
by Allen Wyatt
(last updated July 16, 2016)
Sanjib would like to get a count of all the comments in a worksheet. Unfortunately, Excel doesn't include a function that allows you to access this information. You can, however, get the value manually by using this process:
Figure 1. The Go To Special dialog box.
If you want to get the number of comments and place it into a cell, then you need to use a macro to create a user-defined function.
Function CountComments(rCell As Range) Application.Volatile CountComments = rCell.Parent.Comments.Count End Function
This function grabs the value of the Count property for the Comments collection. It is then returned by the function to the worksheet. To use it in your worksheet, enter a formula such as the following:
The cell address you use in the formula is unimportant; it should simply reference a cell on the worksheet for which you want the count.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12363) 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: Counting Comments in a Worksheet.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
The default color used to format comments is determined by Windows, not Excel. You can adjust the formatting of individual ...Discover More
Adding a comment to a single cell is easy. What if you want to add the same comment to multiple cells, however? Here are some ...Discover More
Excel allows you to not only put information into cells, but into comments attached to those cells. Here's how to copy the ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.