|
发表于 2016-3-30 09:11
|
显示全部楼层
本楼为最佳答案
- Sub 隐藏()
- Dim j%, jmax%
- jmax = [b5].End(2).Column
- For j = 2 To jmax
- If InStr(Cells(5, j), "%") > 0 Or InStr(Cells(5, j), "差额") > 0 Then
- Cells(5, j).EntireColumn.Hidden = True
- End If
- Next
- End Sub
- Sub 取消隐藏()
- Dim j%, jmax%
- jmax = [b5].End(2).Column
- Range(Cells(5, 2), Cells(5, jmax)).EntireColumn.Hidden = False
- End Sub
复制代码 |
|