wieder einmal benötige ich eure Hilfe.
Ich habe eine UF mit mehreren Textboxes.
Mit nachstehendem Code werden die Daten in die Tabelle übertragen.
In die Spalte G möchte ich jedoch eine Formel übertragen.
Private Sub CommandButton1_Click()
Datum = TextBox1.Value
Columns("A:A").Select
Selection.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell = Datum
Vorgang = TextBox2.Text
Columns("B:B").Select
Selection.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell = Vorgang
Nachname = TextBox3.Text
Columns("C:C").Select
Selection.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell = Nachname
Range("a1").Select
End Sub
Die Formel lautet: =SUMME(G10+E11-F11)Das Problem ist, dass sich die Formel mit jeder neuen Zeile um 1 erhöht bis auf den Wert G10.
vom Prinzip her:
Columns("C:C").Select
Selection.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell = Formel...
Besten Dank für eure Hilfe.
Gruss
Peter