Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. 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: Adjusting Comment Printouts.
by Allen Wyatt
(last updated February 29, 2020)
If you use comments in your worksheets quite a bit, you may wonder if there is a way to print the comments, but without the name and colon that normally preface every comment. Unfortunately, there is no built-in way to accomplish this in Excel. However, a macro can be used to quickly pull all the comments from a worksheet and place them in their own worksheet. This worksheet could then be printed, as it would amount to a compendium of all the comments. The macro is as follows:
Sub Workbook_BeforePrint(Cancel As Boolean) myCount = 0 For Each c In ActiveSheet.Comments myCount = myCount + 1 myComment = ActiveSheet.Comments(myCount).Text Sheets(2).Range("a1").Offset(myCount, 0).Value = _ Mid(myComment,InStr(myComment, Chr(10))) Next End Sub
This macro places the comments on the second worksheet in a workbook, so if you want them on a different worksheet (so you don't overwrite information already on the second sheet) you will have to make a modification to the Sheets(2) object.
Note, as well, that the macro name is Workbook_BeforePrint. This means that the macro will run every time you go to print your worksheet.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9602) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Adjusting Comment Printouts.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
One of the pieces of information that Excel can maintain relative to a workbook is a set of comments of your choice. ...Discover More
Need to copy whatever is in a comment into a cell on your worksheet? If you have lots of comments, manually doing this ...Discover More
Adding comments to your worksheet can be helpful in documenting what the worksheet contains. If you want to make sure ...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.