Sub aa()
On Error Resume Next '如果Match查不到age,就不要弹出错误提示
c = Application.Match("age", Rows(1), 0) '在第一行查找age所在列号
If c <> "" Then Columns(c).Delete '查到就删除该列整列
End Sub
Sub Macro2()
For Y = 1 To 256
If sheet1.Cells(1, Y) = "age" Then
X = Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", Y, 1)
sheet1.Columns(X & ":" & X).Delete
End If
Next
End Sub