Supportnet / Forum / Tabellenkalkulation
zelleninhalt in kommentar umwandeln in excel 97
Frage
hi
kann ich zellinhalte in kommentare umwandeln( ohne kopieren per hand) möglichst automatisch, zb per makro
ich möchte das machen, da die anzahl zeichen in einer zelle begrenzt ist auf 255 zeichen, aber bei kommentaren nicht bzw 4096 zeichen lt meiner info.
danke für eure hilfe delo
Antwort 1 von nighty
hi alle
nicht verzagen das sn fragen hihi.
dieses makro wandelt von der aktiven zelle dessen inhalt in einen kommentar um.
Sub Makro1()
adress$ = ActiveWindow.RangeSelection.Address
adress1 = Len(adress$)
For mo = 1 To adress1
If Mid$(adress, mo, 1) = "$" Then
llp = llp + 1
Else
If llp = 1 Then
spalte$ = spalte$ + Mid$(adress, mo, 1)
End If
If llp = 2 Then
zeile$ = zeile$ + Mid$(adress, mo, 1)
zeile1 = Val(zeile$)
End If
End If
Next mo
anfangspalte$ = spalte$
anfangzeile$ = zeile$
anfang01 = Val(anfangzeile$)
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:=ActiveCell & Chr(10) & ""
ActiveCell.Select
ActiveWindow.SmallScroll Down:=-9
End Sub
gruss nighty
nicht verzagen das sn fragen hihi.
dieses makro wandelt von der aktiven zelle dessen inhalt in einen kommentar um.
Sub Makro1()
adress$ = ActiveWindow.RangeSelection.Address
adress1 = Len(adress$)
For mo = 1 To adress1
If Mid$(adress, mo, 1) = "$" Then
llp = llp + 1
Else
If llp = 1 Then
spalte$ = spalte$ + Mid$(adress, mo, 1)
End If
If llp = 2 Then
zeile$ = zeile$ + Mid$(adress, mo, 1)
zeile1 = Val(zeile$)
End If
End If
Next mo
anfangspalte$ = spalte$
anfangzeile$ = zeile$
anfang01 = Val(anfangzeile$)
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:=ActiveCell & Chr(10) & ""
ActiveCell.Select
ActiveWindow.SmallScroll Down:=-9
End Sub
gruss nighty
Antwort 2 von nighty
hi alle
oops so reicht es auch ohje.
Sub Makro1()
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:=ActiveCell & Chr(10) & ""
ActiveCell.Select
ActiveWindow.SmallScroll Down:=-9
End Sub
gruss nighty
oops so reicht es auch ohje.
Sub Makro1()
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:=ActiveCell & Chr(10) & ""
ActiveCell.Select
ActiveWindow.SmallScroll Down:=-9
End Sub
gruss nighty
Antwort 3 von Guenter
Hallo,
noch ein einfaches Makro, gilt nur für Zelle A1 und der Inhalt der Zelle wird gelöscht:
Mit einer Schleife könnte man den Zellinhalt von anderen Zellen in das Kommentarfeld schreiben.
Gruß
Günter
noch ein einfaches Makro, gilt nur für Zelle A1 und der Inhalt der Zelle wird gelöscht:
Sub Test()
Dim Kommentar$
Cells(1, 1).Select
Kommentar = Cells(1, 1).text
Selection.ClearContents
Cells(1, 1).ClearComments
Cells(1, 1).AddComment.text Kommentar
End Sub
Mit einer Schleife könnte man den Zellinhalt von anderen Zellen in das Kommentarfeld schreiben.
Gruß
Günter
Antwort 4 von delo38446
danke für eure hilfe,
ich bin begeistert
delo
ich bin begeistert
delo

