Excel UDF : Dependent cell comment

Suppose you want to populate cell comment based on information from another cell. As a value changes, text specified in comment also changes automatically. There is no such excel function which populates cell comment. I developed a user defined function (UDF) that takes a cell reference and populates a comment.
Function Addcomment(rng As Range, str As String) As String
    If Not rng.Comment Is Nothing Then rng.Comment.Delete
    If Len(str) Then rng.Addcomment.Text str
    rng.Comment.Visible = True
End Function

How to Use :
1. Press ALT + F11 to open Visual Basic Editor
2. In visual basic editor window, Go to Insert >> Module
3. In module, add the above lines of code.
4. In main excel window, type
  =Addcomment(cell reference where you are entering this formula, cell reference of another cell )

Example :
A value is in cell B2 . In cell C2, type =Addcomment(C2,B2). 

Excel Tutorials : 100 Excel Tutorials

About Author:

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 7 years of experience in data science and predictive modeling. During his tenure, he has worked with global clients in various domains like banking, Telecom, HR and Health Insurance.

While I love having friends who agree, I only learn from those who don't.

Let's Get Connected: Email | LinkedIn

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*
Related Posts:
5 Responses to "Excel UDF : Dependent cell comment"
  1. Microsoft Excel is a powerful spreadsheet application, or workbook. A workbook is a computer application that allows a user to enter a series of numbers, along with other data.excel dashboard software

    ReplyDelete
  2. Whether we talk of business automation, or business accounting, excel has it all. Excel is perchance the most important computer software program used across diversified business sectors in the world. salesforce custom dashboard

    ReplyDelete
  3. Since, I had one of the principal portable "cell" phones - I'd get a kick out of the chance to reveal to you a brisk story to begin this discourse.
    free-lookup.net

    ReplyDelete
  4. Interesting topic shown here, i am now working on it regularly here and would say keep the future posts like this continuously.
    CS0-001 exam Question

    ReplyDelete
  5. I've seen precedents of tradesman customers who have possessed the capacity to consider twice to be numerous customers in multi day since they got a PDA.localiser un portable gratuitement grace a son numero

    ReplyDelete

Next → ← Prev