Hilfe bei Datenübertragung
21.11.2020 22:04:41
Mani
Ich versuchen von einem Tabellenblatt in ein anderes Daten zu übertragen.
Das funktioniert soweit auch.
Set wksQ = ThisWorkbook.Worksheets("Data")
Set wksZ = ThisWorkbook.Worksheets("Test")
Letzte1 = ThisWorkbook.Worksheets("Data").Cells(Rows.Count, "A").End(xlUp).Row
Letzte2 = ThisWorkbook.Worksheets("Test").Cells(Rows.Count, "A").End(xlUp).Offset(5, 0).Row
For Q_x = 2 To Letzte1
If wksQ.Cells(Q_x, 7) = "x" Then
Artikel = wksQ.Cells(Q_x, 3)
Menge = wksQ.Cells(Q_x, 13)
Woche = wksQ.Cells(Q_x, 11)
For Z_X = 3 To Letzte2
If wksZ.Cells(Z_X, 3) = Artikel Then
MyRow = Z_X
For x = 18 To 290
If wksZ.Cells(10, x) = Woche Then
MyCol = x
wksZ.Cells(MyRow, MyCol) = Menge
End If
Next
End If
Next
End If
Next
Mein Problem ist wenn ich in Woche wksQ.Cells(Q_x, 11) und If wksZ.Cells(10, x) = Woche zum Beispiel 2000 stehen habe was ja identische Daten sind werden mir keine Daten übertragen.
Habe es schon mit Formatierung oder Text in Spalten probiert. Leider ohne Erfolg.
Woran kann das liegen ? Ich bin komplett Ratlos. Setze ich vor die 2000 einen Buchstaben funktioniert es.
Brauche echt eure Hilfe
Viele Grüße
Besten Dank
der Mani