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.
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!
Need to print out comments, but in a way that you control what is included in the printout? Here's a way you can extract ...Discover More
Excel allows you to add comments to individual cells in your workbook. Unfortunately, Excel doesn't provide a way to ...Discover More
One of the pieces of information that Excel can maintain relative to a workbook is a set of comments of your choice. ...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.