Ich kopiere Daten von einem Blatt mit gestrigen Informationen auf ein anderes Blatt mit einer Tabelle mit historischen Daten. Das erste Blatt ist eigentlich eine vlookup Formel, also muss ich den Wert nur in die historische Tabelle einfügen. Dies ist, was ich geschrieben habe, aber es sagt, dass die letzte Zeile nicht funktioniert. Kann jemand helfen?Kopieren und Einfügen von Werten an ein Ziel
Option Explicit
Sub Test()
'
' UpdateTablesAndCharts Macro
'
' Keyboard Shortcut: Option+Cmd+t
'
Dim lngNextEmptyRow As Long
Dim lngLastImportRow As Long
Dim shtYstrdy As Worksheet
Set shtYstrdy = ThisWorkbook.Worksheets("Yesterday")
With ThisWorkbook.Worksheets("ICT Historical Crashlytics Data")
lngNextEmptyRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
.Rows(lngNextEmptyRow).Insert Shift:=xlDown
.Cells(lngNextEmptyRow, "A").Value2 = _
.Cells(lngNextEmptyRow - 1, "A").Value2 + 1
shtYstrdy.Range("AM1:AN1").Copy
Cells("A" & lngNextEmptyRow).PasteSpecial xlPasteValues
End With
End Sub
Aus irgendeinem Grund es ist immer noch nicht, dass die letzte Zeile nehmen. Was macht Resize? –
Was ist der Fehler? –
wird nicht kompiliert, weil es einen Syntaxfehler gibt –