online 1
gast (50)

/ Forum / Tabellenkalkulation

TabellenkalkulationTabellenkalkulation

Fragevon tomtom123 vom 26.05.2021, 17:46 Options

Lösung

Letzte belegte Zelle in Spalte A soll 95 mal in die darunter liegenden Zellen kopiert werden

Hallo,
ich habe ein Problem, zu dem ich leider nichts im Internet gefunden habe. In Spalte A soll in einem Makro die letzte belegte Zelle beginnend ab A 3 gesucht werden und dann jeweils in die darunterliegenden Zellen 95 mal kopiert werden.
Kann mir jemand helfen ?
Freundliche Grüße
tomtom123


Antwort schreiben

Antwort 1 von Hajo_Zi vom 26.05.2021, 19:17 Options

Hallo Tom

Option Explicit

Sub Tom()
Dim LoLetzte As Long
LoLetzte = IIf(IsEmpty(Cells(Rows.Count, 1)), Cells(Rows.Count, 1).End(xlUp).Row, Rows.Count)
If LoLetzte < 3 Then LoLetzte = 3
Range(Cells(LoLetzte + 1, 1), Cells(LoLetzte + 95, 1)) = Cells(LoLetzte, 1)
End Sub

Gruß Hajo

Antwort 2 von Hajo_Zi vom 26.05.2021, 19:25 OptionsLösung

Lösung
Hallo Tom,
oder tatsächlich kopieren
Option Explicit

Sub Tom()
Dim LoLetzte As Long
LoLetzte = IIf(IsEmpty(Cells(Rows.Count, 1)), Cells(Rows.Count, 1).End(xlUp).Row, Rows.Count)
If LoLetzte < 3 Then LoLetzte = 3
Cells(LoLetzte, 1).Copy Range(Cells(LoLetzte + 1, 1), Cells(LoLetzte + 95, 1))
End Sub

Gruß Hajo

Antwort 3 von tomtom123 vom 26.05.2021, 20:49 Options

Hallo Hajo,
hab das letzte gleich ausprobiert. Es funktioniert super ! Vielen Dank !!! Einen Schönen Abend noch.
Tom

Antwort 4 von maxera vom 30.07.2021, 18:36 Options

Hallo,
die Lösung ist wirklich Spitze. Ich habe leider nicht das Wissen, um die Lösung zu verstehen. Wie müsste das denn Aussehen, wenn ich das ganze in eine andere Spalte z.B. Zelle"B12" verlege?
Gruß maxera

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Thu Jan 8 21:07:44 2026