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.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Comments can be very helpful in a worksheet. After they are added, you may want to change what they contain. Here's how to ...Discover More
Pasting the contents of a single cell into a comment is rather easy. Pasting the contents of a range of cells is a different ...Discover More
Add a comment to a worksheet, and you'll notice that Excel places a small, red triangle at the upper-right corner of the cell ...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.