Sub dubletten_loeschen
odoc = ThisComponent
osheet = odoc.sheets(0) '1. Tabblatt
orows = osheet.getrows
do while osheet.getcellbyposition(0,i+1).string <> "" 'Prüfung auf Inhalt in Spalte A
do while osheet.getcellbyposition(0,i).string = osheet.getcellbyposition(0,i+1).string
orows.removebyindex(i+1,1) 'index und Anzahl
loop
i = i + 1
loop
End Sub[
Gruß Karo
LO7.4.7.2debian 12(bookworm) auf Raspberry4b 8GB (64bit) LO7.6.2.1 flatpakdebian 12(bookworm) auf Raspberry4b 8GB (64bit)
Sub dubletten_loeschen
odoc = ThisComponent
osheet = odoc.sheets(0) '1. Tabblatt
orows = osheet.getrows
do while osheet.getcellbyposition(0,i+1).string <> "" 'Prüfung auf Inhalt in Spalte A
do while osheet.getcellbyposition(0,i).string = osheet.getcellbyposition(0,i+1).string
orows.removebyindex(i+1,1) 'index und Anzahl
loop
i = i + 1
loop
End Sub[
Sub dubletten_loeschen
odoc = ThisComponent
osheet = odoc.sheets(0) '1. Tabblatt
orows = osheet.getrows
do while osheet.getcellbyposition(0,i+1).string <> "" 'Prüfung auf Inhalt in Spalte A
do while osheet.getcellbyposition(0,i).string = osheet.getcellbyposition(0,i+1).string
orows.removebyindex(i+1,1) 'index und Anzahl
loop
i = i + 1
loop
End Sub[
Gruß Karo
Hey,
Wie würde das Makro aussehen, wenn ich eine komplette Zeile bzw. mehrere Suchkriterien (z.B. Name und Vornamen und Adresse) vergleichen will und dann eben auch löschen will, so es ein doppelter Eintrag ist? Wie und wo kann man die Anzahl der Suchkriterien sprich Spalten verändern?