4k Aufrufe
Gefragt in Tabellenkalkulation von
hallochen...

hab da mal eine frage... ich habe mehrere zellen auf tabellenblatt a möchte die inhalte dieser zellen mit hilfe nur eines klicks (theoretisch ein makro) in ein anderes tabellenblatt b übertragen... da ich die daten aber in den zellen von blatt a ändern möchte sollte nach der ädnerung die nächste zeile von blatt b genutzt werden damit die erste eingabe erhalten bleibt... quasi wie ein formular mit datensammlung in blatt b...

geht soetwas? wenn ja könnt ihr mir bitte helfen?

danke melli

16 Antworten

0 Punkte
Beantwortet von saarbauer Profi (15.6k Punkte)
Hallo,

vergess dir AW 9, hiermit versuch es mal :

###
Private Sub CommandButton1_Click()
lz = Sheets(Datenausgabe).Range("A65536").End(xlUp).Row + 1


Sheets(Datenausgabe).Cells(lz, 1) = Sheets(Formular).Cells(4, 2)
Sheets(Datenausgabe).Cells(lz, 2) = Sheets(Formular).Cells(9, 3)
Sheets(Datenausgabe).Cells(lz, 3) = Sheets(Formular).Cells(9, 7)
Sheets(Datenausgabe).Cells(lz, 4) = Sheets(Formular).Cells(15, 3)
Sheets(Datenausgabe).Cells(lz, 5) = Sheets(Formular).Cells(15, 8)
Sheets(Datenausgabe).Cells(lz, 6) = Sheets(Formular).Cells(18, 3)
Sheets(Datenausgabe).Cells(lz, 7) = Sheets(Formular).Cells(18, 8)
Sheets(Datenausgabe).Cells(lz, 8) = Sheets(Formular).Cells(21, 3)
Sheets(Datenausgabe).Cells(lz, 9) = Sheets(Formular).Cells(27, 3)
Sheets(Datenausgabe).Cells(lz, 10) = Sheets(Formular).Cells(33, 3)
Sheets(Datenausgabe).Cells(lz, 11) = Sheets(Formular).Cells(39, 3)
Sheets(Datenausgabe).Cells(lz, 12) = Sheets(Formular).Cells(39, 8)
Sheets(Datenausgabe).Cells(lz, 13) = Sheets(Formular).Cells(42, 3)
Sheets(Datenausgabe).Cells(lz, 14) = Sheets(Formular).Cells(42, 4)
Sheets(Datenausgabe).Cells(lz, 15) = Sheets(Formular).Cells(42, 5)
Sheets(Datenausgabe).Cells(lz, 16) = Sheets(Formular).Cells(42, 6)
Sheets(Datenausgabe).Cells(lz, 17) = Sheets(Formular).Cells(42, 7)
Sheets(Datenausgabe).Cells(lz, 18) = Sheets(Formular).Cells(42, 8)
Sheets(Datenausgabe).Cells(lz, 19) = Sheets(Formular).Cells(42, 9)
Sheets(Datenausgabe).Cells(lz, 20) = Sheets(Formular).Cells(42, 10)
Sheets(Datenausgabe).Cells(lz, 21) = Sheets(Formular).Cells(42, 11)
Sheets(Datenausgabe).Cells(lz, 22) = Sheets(Formular).Cells(42, 12)
Sheets(Datenausgabe).Cells(lz, 23) = Sheets(Formular).Cells(47, 7)
Sheets(Datenausgabe).Cells(lz, 24) = Sheets(Formular).Cells(50, 3)
Sheets(Datenausgabe).Cells(lz, 25) = Sheets(Formular).Cells(55, 6)
Sheets(Datenausgabe).Cells(lz, 26) = Sheets(Formular).Cells(55, 7)
Sheets(Datenausgabe).Cells(lz, 27) = Sheets(Formular).Cells(55, 8)

End Sub
###

Gruß

Helmut
0 Punkte
Beantwortet von
herrje... ihr seid so lieb und gebt euch mühe...

bleibt aber alles leider das selbe... selber fehler und glbmarkierte zeile:

lz = Sheets(Datenausgabe).Range("A65536").End(xlUp).Row + 1


zum verzweifeln...
0 Punkte
Beantwortet von saarbauer Profi (15.6k Punkte)
Hallo,

da habe ich im Moment garnicht dran gedacht, man sieht den Wald vor Bäumen nicht.

###
Private Sub CommandButton1_Click()
lz = Sheets("Datenausgabe").Range("A65536").End(xlUp).Row + 1


Sheets("Datenausgabe").Cells(lz, 1) = Sheets("Formular").Cells(4, 2)
Sheets("Datenausgabe").Cells(lz, 2) = Sheets("Formular").Cells(9, 3)
Sheets("Datenausgabe").Cells(lz, 3) = Sheets("Formular").Cells(9, 7)

........usw.


End Sub
###

Die namen müssen mit " versehen werden.

Gruß

Helmut
0 Punkte
Beantwortet von
DAS WAR ES.... SUPER!!!

Habt ganz lieben dank... es funktioniert....

ich freu mich ihr seid echt toll....

ganz ganz lieben dank... :)
0 Punkte
Beantwortet von rainberg Profi (14.9k Punkte)
Hallo melli92,

mein Vorschlag wäre:

Option Explicit

Private Sub CommandButton1_Click()
Dim intLz As Integer
Dim arr(27)
arr(0) = Sheets("Formular").Cells(4, 2)
arr(1) = Sheets("Formular").Cells(9, 3)
arr(2) = Sheets("Formular").Cells(9, 7)
arr(3) = Sheets("Formular").Cells(15, 3)
arr(4) = Sheets("Formular").Cells(15, 8)
arr(5) = Sheets("Formular").Cells(18, 3)
arr(6) = Sheets("Formular").Cells(18, 8)
arr(7) = Sheets("Formular").Cells(21, 3)
arr(8) = Sheets("Formular").Cells(27, 3)
arr(9) = Sheets("Formular").Cells(33, 3)
arr(10) = Sheets("Formular").Cells(39, 3)
arr(11) = Sheets("Formular").Cells(39, 8)
arr(12) = Sheets("Formular").Cells(42, 3)
arr(13) = Sheets("Formular").Cells(42, 4)
arr(14) = Sheets("Formular").Cells(42, 5)
arr(15) = Sheets("Formular").Cells(42, 6)
arr(16) = Sheets("Formular").Cells(42, 7)
arr(17) = Sheets("Formular").Cells(42, 8)
arr(18) = Sheets("Formular").Cells(42, 9)
arr(19) = Sheets("Formular").Cells(42, 10)
arr(20) = Sheets("Formular").Cells(42, 11)
arr(21) = Sheets("Formular").Cells(42, 12)
arr(22) = Sheets("Formular").Cells(47, 7)
arr(23) = Sheets("Formular").Cells(50, 3)
arr(24) = Sheets("Formular").Cells(55, 6)
arr(25) = Sheets("Formular").Cells(55, 7)
arr(26) = Sheets("Formular").Cells(55, 8)
intLz = Sheets("Datenausgabe").Range("A65536").End(xlUp).Row + 1
Worksheets("Datenausgabe").Range("A" & intLz & ":AA" & intLz) = arr
End Sub


Gruß
Rainer
0 Punkte
Beantwortet von rainberg Profi (14.9k Punkte)
Hallo melli,

habe den Code noch etwas abgespeckt

Option Explicit

Private Sub CommandButton1_Click()
Dim intLz As Integer
Dim arr(27)
With Worksheets("Formular")
arr(0) = .Cells(4, 2)
arr(1) = .Cells(9, 3)
arr(2) = .Cells(9, 7)
arr(3) = .Cells(15, 3)
arr(4) = .Cells(15, 8)
arr(5) = .Cells(18, 3)
arr(6) = .Cells(18, 8)
arr(7) = .Cells(21, 3)
arr(8) = .Cells(27, 3)
arr(9) = .Cells(33, 3)
arr(10) = .Cells(39, 3)
arr(11) = .Cells(39, 8)
arr(12) = .Cells(42, 3)
arr(13) = .Cells(42, 4)
arr(14) = .Cells(42, 5)
arr(15) = .Cells(42, 6)
arr(16) = .Cells(42, 7)
arr(17) = .Cells(42, 8)
arr(18) = .Cells(42, 9)
arr(19) = .Cells(42, 10)
arr(20) = .Cells(42, 11)
arr(21) = .Cells(42, 12)
arr(22) = .Cells(47, 7)
arr(23) = .Cells(50, 3)
arr(24) = .Cells(55, 6)
arr(25) = .Cells(55, 7)
arr(26) = .Cells(55, 8)
End With
With Worksheets("Datenausgabe")
intLz = .Range("A65536").End(xlUp).Row + 1
.Range("A" & intLz & ":AA" & intLz) = arr
.Select
End With
End Sub


Gruß
Rainer
...