|
本帖最后由 sdfsdfs 于 2014-10-26 15:01 编辑
Sub Macro1()
Dim rng As Range, i&, j&
w = Array("dd", "kk")
For i = 2 To Cells(7, Columns.Count).End(xlToLeft).Column
For j = 0 To UBound(w)
If Cells(7, i) = w(j) Then
If rng Is Nothing Then Set rng = Cells(7, i) Else Set rng = Union(rng, Cells(7, i)): Exit For
End If
Next
Next
If Not rng Is Nothing Then rng.EntireColumn.Delete
End Sub |
|