HAllo
Ohne Schleife
Sub SpalteZeit()
Dim wsA As Worksheet, wsB As Worksheet
Dim lastRowA As Long, lastRowB As Long
Dim dieselValueA As String, dieselValueB As String
Dim i As Long
Dim startTime As Double, endTimeA As Double, endTimeB As Double
Set wsA = ThisWorkbook.Sheets("TabelleA")
Set wsB = ThisWorkbook.Sheets("TabelleB")
lastRowA = wsA.Cells(wsA.Rows.Count, "E").End(xlUp).Row
lastRowB = wsB.Cells(wsB.Rows.Count, "E").End(xlUp).Row
dieselValueA = InputBox("Wert für Spalte K:", "Tabelle A")
If dieselValueA = "" Then Exit Sub
dieselValueB = InputBox("Wert für Spalte K:", "Dieselfloater Tabelle B")
If dieselValueB = "" Then Exit Sub
startTime = Timer
wsA.Cells(2, "K").Resize(lastRowA - 1, 1).Value = dieselValueA / 100
endTimeA = Timer
MsgBox "Tabelle A wurde erfolgreich ausgefüllt." & vbCrLf & _
"Laufzeit: " & Format(endTimeA - startTime, "0.00") & " Sekunden.", vbInformation, "Fertig - Tabelle A"
wsB.Cells(2, "K").Resize(lastRowB - 1, 1).Value = dieselValueB / 100
endTimeB = Timer
MsgBox "Tabelle B wurde erfolgreich ausgefüllt." & vbCrLf & _
"Laufzeit: " & Format(endTimeB - endTimeA, "0.00") & " Sekunden.", vbInformation, "Fertig - Tabelle B"
End Sub
LG UweD
|