Hi,
Copy the below code and paste in your Sheet1 VBA editor and check..
Private Sub Worksheet_Change(ByVal Target As Range)
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
With Target(1)
If Intersect(.Cells, Range("A1:IV65536")) Is Nothing Then Exit Sub
If .HasFormula Then Exit Sub
On Error Resume Next
.Comment.Delete
On Error GoTo 0
If .Value = "ABC123" Then
.Select
With .AddComment
.Text Text:="Defected power supply"
.Visible = True
End With
Application.EnableEvents = True
End If
End With
End Sub
Bookmarks