Sub HideCol() For i = 1 To 3 If InStr(Cells(1, i).Value, "查") <> 0 Then Cells(1, i).EntireColumn.Hidden = True End If Next iEnd Sub