Sub DeleteColumns()
Dim i As Long, maxCol As Long
Dim str As String
maxCol = Cells(4, Columns.Count).End(xlToLeft).Column
For i = maxCol To 1 Step -1
str = Cells(4, i)
If (str Like "*min*") Or (str Like "*max*") Then
Cells(4, i).EntireColumn.Delete
End If
Next i
End Sub
写好时发现已经有知友回答了, 而且他的回答很赞. 但是既然写了就贴出来吧, 结果都一样, 细节处理略有不同.