Canada Flag

Back


Private Sub Worksheet_Activate()
' Written by Barrie Davidson

    Application.ScreenUpdating = False
    Cells.EntireRow.Hidden = False
    With Range("E1:E28")
        .FormulaR1C1 = "=IF(AND(RC[-2]=0,RC[-1]=0,RC[-1]<>""""),1,"""")"
        .SpecialCells(xlCellTypeFormulas, 1).EntireRow.Hidden = True
        .ClearContents
    End With
   Application.ScreenUpdating = True

End Sub



Thanks to the suggestion of an anonymous friend for the more efficient code.

Copyright © 2001 by Barrie R. Davidson
Added April 6, 2001