Sub test()
Dim arr, y, v
arr = Array("Spalte 3", "Spalte 13", "Spalte 16")
For y = Cells.Find("*", Cells(1), -4123, 2, 2, 2, False).Column To 1 Step -1
For Each v In arr
If v = Cells(1, y).Value Then
Columns(y).Delete
Exit For
End If
Next v
Next y
End Sub
Sub tast()
Dim arr, v, c
arr = Array("Spalte 32", "Spalte 12", "Spalte 2")
For Each v In arr
Set c = Rows(1).Find(v, , xlValues, xlWhole)
If Not c Is Nothing Then
c.EntireColumn.Delete
End If
Next v
End Sub
|