ich möchte anstatt kompletter Zeilen zu löschen (wenn in einer Zelle der Wert X auftaucht) sondern nur bestimmte Zellen in einer Zeile löschen.
Der bisher eingesetzte Code:
Sub III_ZeilenKiller() Dim i As Long, laR As Long Dim sp As Integer sp = 2 'Spaltennummer (1=A, 2=B, ...) Application.ScreenUpdating = False laR = Cells(Rows.Count, sp).End(xlUp).Row For i = laR To 1 Step -1 If Cells(i, sp).Value = "ABNH" Or Cells(i, sp).Value = "ALBLSTRECKEM2" Or Cells(i, sp). _ Value = "ALPRSTECKEKG" Or Cells(i, sp).Value = "FRACHT" Or Cells(i, sp).Value = "DELWOSCHLIFFKG" Or Cells(i, sp).Value = "FHVP1" Or Cells(i, sp).Value = "HVB" Or Cells(i, sp).Value = "FFRACHT1" Or Cells(i, sp).Value = "FRACHTA" Or Cells(i, sp).Value = "FRACHTR" Or Cells(i, sp).Value = "HOLZ-EINWEGVERSCHLAG" Or Cells(i, sp).Value = "HVBA" Or Cells(i, sp).Value = "HVPA" Or Cells(i, sp).Value = "KLM" Or Cells(i, sp).Value = "MINDESTR.LACK" Or Cells(i, sp).Value = "NAUTHFRACHT" Or Cells(i, sp).Value = "VERPACKUNG" Or Cells(i, sp).Value = "" Or Cells(i, sp).Value = "ALPRSTRECKEKG" Then Cells(i, sp).EntireRow.Delete End If Next i Application.ScreenUpdating = True End Sub
Was müsste an "Cells(i, sp).EntireRow.Delete" abgeändert werden?
Vielleicht kann mir jemand hierbei helfen.
Gruß
Sascha