AW: Dynamische Zellen Range Löschen anhand Spaltenwert
22.11.2018 11:41:19
Werner
Hallo,
so in etwa geht es nicht, aber so:
Option Explicit
Public Sub löschen()
Dim ws As Worksheet, loSpalte As Long, i As Long
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
Select Case ws.Name
Case "Tabelle1", "Tabelle2", "Tabelle3"
With ws
loSpalte = .Cells(57, .Columns.Count).End(xlToLeft).Column
For i = loSpalte To 1 Step -1
If .Cells(57, i) = "Nein" Then
Union(.Range(.Cells(9, i), .Cells(17, i)), .Range(.Cells(19, i), _
.Cells(21, i)), .Range(.Cells(23, i), .Cells(25, i)), _
.Range(.Cells(27, i), .Cells(33, i)), _
.Range(.Cells(38, i), .Cells(49, i))).ClearContents
End If
Next i
End With
Case Else
End Select
Next ws
End Sub
Gruß Werner