Excel 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:
Copy the above vba code
Open a new excel file
Right click on any sheet tab name and select “view code” option.
Don’t be scared of the VBA editor. Take a deep breath.
Click on “Insert” menu option and select “Module”
Paste the code in the new module
Save the workbook and start using the getComment() formula.
The lengthy and more stable version:
Same as first 6 steps above.
Press ctrl+s to save the work book. Specify “excel add-in” as the file type.
Now, go back to excel and install this new add-in
That is all. Now you can use getComment() formula in your workbooks.
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 story • FREE Excel tips book
Let’s try something different. I will share a data analytics challenge here. Post your solutions in the comments. Our first challenge involves Employee Data Analysis.
Get cell comments using Excel Formula
Chandoo
Share
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:
The lengthy and more stable version:
Related: How to change the shape of cell comments from rectangle to any other shape
Share this tip with your colleagues
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 story • FREE Excel tips book
Want an AWESOME Excel Class?
FREE Goodies 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.
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.
Who is my boss’s boss? [Data Analytics Challenge – 001]
Let’s try something different. I will share a data analytics challenge here. Post your solutions in the comments. Our first challenge involves Employee Data Analysis.
New Zealand GST Calculation with Excel [Free Template]
Make a Pivot from Another Pivot Table in Excel
How to use XLOOKUP with two sheets?
How to use XLOOKUP in Excel?
Related Tips
New Zealand GST Calculation with Excel [Free Template]
Make a Pivot from Another Pivot Table in Excel
How to use XLOOKUP with two sheets?
How to use XLOOKUP in Excel?
How to Merge Multiple CSV Files in Excel (Step-by-Step Guide)
How to enable developer ribbon in Excel?