Share via

Comments: dynamic content

Anonymous
2013-02-12T09:55:45+00:00

Excel 2010 on Window7.

what are the possibilities to put dynamic contents in a comment?  Could we for example put a formula that refers to a cell in the spreadsheet?

Many thanks in anticipation.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2013-02-12T10:09:31+00:00

Excel 2010 on Window7.

 

what are the possibilities to put dynamic contents in a comment?  Could we for example put a formula that refers to a cell in the spreadsheet?

 

Many thanks in anticipation.

Hi,

No you can't do that but you could use VB code to display dynamic content.  This assumes we already have a comment in cell A1. Right click the worksheet tab, view code and paste the code below in. Now if you change the cell A1, whatever you put in there is also added as the comment text,

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Then Exit Sub

If Target.Address = "$A$1" Then

    Application.EnableEvents = False

    Range("A1").Comment.Text Text:=Range("A1").Text

    Application.EnableEvents = True

    End If

End Sub

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2013-02-12T12:36:41+00:00

    Thanks Mike.

    Under the circumstances that there is no function/formula for dynamic contents, the next best choice is the VB code.

    Thanks for providing already a template.  It would work well, I will adapt it to my needs.

    Was this answer helpful?

    0 comments No comments