Hi All,
I have the following Ranges within the code below but it seems to be too much as I get an error "Run Time Error 1004"
I think it may be because there is 24 sets of ranges
Is there a better way to have this work with the ranges but make the row shorter and avoid the error
I have the following Ranges within the code below but it seems to be too much as I get an error "Run Time Error 1004"
I think it may be because there is 24 sets of ranges
Is there a better way to have this work with the ranges but make the row shorter and avoid the error
Code:
Private Sub Worksheet_Calculate()
Dim c As Range
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableEvents = False
End With
With Range("W8:W115, W118:W225, W228:W335, W338:W445, W448:W555, W558:W665, W668:W775, W778:W885, W888:W995 , W998:W1105 , W1108:1215 , W1218:W1325 , W1328:W1435 , W1438:W1545 , W1548:W1655 ,W1658:W1765 , W1768:W1875 , W1878:W1985 , W1988:W2095 , W2098:W2205, W2208:W2315, W2318:W2425, W2428:W2535, W2538:W2645 ")
.Cells.EntireRow.Hidden = False
For Each c In .Cells
If c.Value = "" Then
c.EntireRow.Hidden = True
Else
c.EntireRow.Hidden = False
End If
Next c
End With
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableEvents = True
End With
End Sub