try:
Sub insertcomment(): Dim SN As String, n As Long, Abb As String, Z
SN = "msr,Montserrat,afg,Afghanistan," & _
"aho,Netherlands Antilles,aia,Anguilla,alb,Albania"
Z = Split(SN, ","):Range("F:F").ClearComments
For x = 10 To 14
Abb = Cells(x, 6).Value
For n = LBound(Z) To UBound(Z) Step 2
If Z(n) = Abb Then
Abb = Z(n + 1): Exit For: End If: Next n
If Abb <> "" Then
With Cells(x, 6)
.AddComment
.Comment.Text Text:=Abb
.Comment.Shape.ScaleWidth 1.07, msoFalse, msoScaleFromTopLeft
.Comment.Shape.ScaleHeight 0.23, msoFalse, msoScaleFromTopLeft
.Comment.Shape.TextFrame.HorizontalAlignment = xlHAlignCenter
.Comment.Shape.TextFrame.VerticalAlignment = xlHAlignCenter
End With: End If
Abb = "": Next x
End Sub
Bookmarks