Sub Bunka_do_Poznamky() Dim x_rng As Range, c As Range, x Set x_rng = ActiveSheet.Range("A1:A9") For Each c In x_rng x = Trim(c.Text) c.ClearComments If Len(x) > 0 Then c.AddComment x End If Next c End Sub
Private Sub Worksheet_Change(ByVal Target As Range) Dim x, c As Range On Error GoTo xErr: Application.EnableEvents = False Set c = Range("A" & CStr(Target.Row)) x = Trim(Target.Text) c.ClearComments If Len(x) > 0 Then c.AddComment x End If Application.EnableEvents = True Exit Sub xErr: Application.EnableEvents = True End Sub