How To Easily Extract Comments Contents In Excel?


Comments in an Excel spreadsheet are an excellent method to provide additional information or explanations to specific cells. However, extracting the content of these comments can be a time−consuming and laborious effort at times. In this tutorial, we'll show you how to extract comment contents in Excel in a quick and easy way. Whether you need to examine and summarise comment material, incorporate it into reports, or simply acquire a better knowledge of the data, this tutorial will walk you through the procedures.

This tutorial does not require expert Excel skills. We will provide detailed instructions as well as screenshots to walk you through each step. So, let's get started and discover the hidden gems in your Excel comments!

Easily Extract Comments Contents

Here, we will first create a user−defined formula and then use it to complete the task. So let us see a simple process to know how you can easily extract comments contents in Excel.

Step 1

Consider an Excel sheet where you have multiple comments for the cells.

First, right−click on the sheet name and select "View Code" to open the VBA application. Then, click on "Insert" and select "Module.

Right click > View code > Insert > Module.

Step 2

Then copy the below code into the text box.

Code

Function getComment(xCell As Range) As String
On Error Resume Next
getComment = xCell.Comment.Text
End Function

Step 3

Then use Alt + Q to close VBA. Then click on an empty cell where you want to display comment context, enter the formula as =getComment(A2) and click enter.

Step 4

Finally, use the autofill handle to complete the task.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can easily extract the contents of comments in Excel to highlight a particular set of data.

Updated on: 13-Jul-2023

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements