Smoakstack
Board Regular
- Joined
- Mar 28, 2011
- Messages
- 79
I am looking for zeros and hiding column data to make table less cumbersome. here is my code:
Dim A as Range
Dim B as Range
Dim C as Range
Dim D as Range
For Each C In Sheets("Elevations").Range("M400:XX400")
If (C.Value = 0) Then
C.EntireColumn.Hidden = True
Else
C.EntireColumn.Hidden = False
End If
Next C
For Each B In Sheets("Elevations").Range("b9:b400")
If (B.Value = 0) Then
B.EntireRow.Hidden = True
Else
B.EntireRow.Hidden = False
End If
Next B
I have several sheets that these codes are running on, but it takes soo long. Is there a way to make it less of a wait using an array of some sort?
Dim A as Range
Dim B as Range
Dim C as Range
Dim D as Range
For Each C In Sheets("Elevations").Range("M400:XX400")
If (C.Value = 0) Then
C.EntireColumn.Hidden = True
Else
C.EntireColumn.Hidden = False
End If
Next C
For Each B In Sheets("Elevations").Range("b9:b400")
If (B.Value = 0) Then
B.EntireRow.Hidden = True
Else
B.EntireRow.Hidden = False
End If
Next B
I have several sheets that these codes are running on, but it takes soo long. Is there a way to make it less of a wait using an array of some sort?