cell comments

  • Thread starter Thread starter Greggo G
  • Start date Start date
G

Greggo G

here it goes - is it possible to have a comment automatically appear in a
cell if the info entered meets certain criteria?

Greg
 
Yes. Right click on sheet tab, view code, paste this in. Adjust as necessary.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target Is Nothing Then Exit Sub

'Change this to your criteria
If Target.Value = "Bob" Then
With Target
.AddComment

'Set this to true if you want
'comment visible all the time
.Comment.Visible = False

'Change text to whatever you want comment to be
.Comment.Text Text:="My comment" & CHAR
End With
End If

End Sub
 
Thanks Luke - I'll play around and see if I can get it to work (still have a
whole lot to learn about VBA)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top