Hide and un-hide rows then sort on Worksheet_Activate event
There are two things that I think can easily be done.


Find out where the data actually ends rather than always using row 500. Use a function like this:

Function LastRowNum(sheetName As String, columnLetter As String) As Long

    With ThisWorkbook.Worksheets(sheetName)
        LastRowNum = .Range(columnLetter &amp; .Rows.Count).End(xlUp).Row
    End With

End Function

If you are going to use an AutoFilter in the SortingRisk proc then why not use it to hide the empty rows? It should be much quicker than looping through cells using VBA.