一键隐藏合计数据为0的列
列很多,但是我只想看到有数据的列,怎么隐藏数据为0的列,求教各位大侠.....................
Sub test1()
Dim Rng As Range
Dim Rng1 As Range
For Each Rng1 In Range("G19").CurrentRegion
If Rng1.Value = 0 Then
If Rng Is Nothing Then
Set Rng = Rng1
Else
Set Rng = Union(Rng, Rng1)
End If
End If
Next
Rng.EntireColumn.Hidden = True
End Sub
页:
[1]