Hello dear
I have a workbook with 30 worksheets. How do I use or execute this macro on all the 25 worksheets in a workbook in one go, thus excluding the 5 worksheets in this workbook ? In other words, I do not want this macro to be run on these 5 initial worksheets. I want it to run only on these 25 worksheets.
I gave it a try by tweaking the code below but it gave me a compile error.
Here is the code:
Sub test()
With Application
.Calculation = xlCalculationManual
.EnableEvents = False
.ScreenUpdating = False
End With
Dim Rng As Range
Dim MyCell As Range
Dim c As Range
Set Rng = Range("B2:B1000")
For Each MyCell In Rng
If MyCell.Font.ColorIndex = 3 Then
MyCell.EntireRow.Hidden = True
End If
Next MyCell
For Each c In Range("k2:k1000")
If c.Value = 0 Then
c.EntireRow.Hidden = True
End If
Next
With Application
.Calculation = xlCalculationAutomatic
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub
Can somebody help me with this ? Even a little help will be very nice, thank you.