Get cell comments using Excel Formula

Share

Facebook
Twitter
LinkedIn

Get Cell Comments using FormulasExcel has a very useful feature called “cell comments” using which you can add comment to a cell. This is a very good way to gather remarks and review comments when a workbook is shared with colleagues and others. But what if you have typed a ton of cell comments and now want a way to extract them and do something with that data?

Well, no need to select each comment and copy the contents. You can use a simple user defined formula (UDF) to do just that. Here is a one line formula that I wrote.

Function getComment(incell) As String
' aceepts a cell as input and returns its comments (if any) back as a string
On Error Resume Next
getComment = incell.Comment.Text
End Function

To make it work,

To make the getComment() UDF work for you, you need to install it first. Here is a step by step guide if you dont know how to install user defined formulas in excel.

The simple and easy version:

  1. Copy the above vba code
  2. Open a new excel file
  3. Right click on any sheet tab name and select “view code” option.
  4. Don’t be scared of the VBA editor. Take a deep breath.
  5. Click on “Insert” menu option and select “Module”
  6. Paste the code in the new module
  7. Save the workbook and start using the getComment() formula.

The lengthy and more stable version:

  1. Same as first 6 steps above.
  2. Press ctrl+s to save the work book. Specify “excel add-in” as the file type.
  3. Now, go back to excel and install this new add-in
  4. That is all. Now you can use getComment() formula in your workbooks.

Related: How to change the shape of cell comments from rectangle to any other shape

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

Leave a Reply