Ich benötige bitte ein Makro, welches die letzten 10 Zellen mit Inhalt von Spalte A in Spalte B kopiert. ( zwischen Inhalte sind leere Zellen in Spalte A vorhanden).
Vielen lieben Dank im Voraus
Manuel
| Arbeitsblatt mit dem Namen 'Tabelle1' | ||
| A | B | |
| 1 | Text | Text6 |
| 2 | Text1 | Text7 |
| 3 | Text2 | Text8 |
| 4 | Text3 | Text9 |
| 5 | Text10 | |
| 6 | Text4 | Text11 |
| 7 | Text5 | Text12 |
| 8 | Text6 | Text13 |
| 9 | Text14 | |
| 10 | Text7 | Text15 |
| 11 | Text8 | |
| 12 | Text9 | |
| 13 | ||
| 14 | ||
| 15 | Text10 | |
| 16 | Text11 | |
| 17 | Text12 | |
| 18 | ||
| 19 | ||
| 20 | Text13 | |
| 21 | Text14 | |
| 22 | Text15 | |
| 23 | ||
| 24 | ||
| 25 | ||
| Zelle | Formel |
| B1 | =INDEX(A:A;AGGREGAT(14;6;ZEILE(A$1:A$999)/(A$1:A$999>"");11-ZEILE(A1))) |
| Verwendete Systemkomponenten: [Windows (32-bit) NT 6.02] MS Excel 2010 |
| Diese Tabelle wurde mit Tab2Html (v2.6.0) erstellt. ©Gerd alias Bamberg |
Option Explicit
Sub die_letzte_zehn()
Dim i&, x&, LoLetzte&
Columns("B:B").ClearContents
i = 10
LoLetzte = Cells(Rows.Count, 1).End(xlUp).Row
For x = LoLetzte To 1 Step -1
If Cells(x, 1) "" Then
Cells(i, 2) = Cells(x, 1): i = i - 1
End If
If i
Gruß Matthias