I need to set myRowRange = Range("A" & lastline% : "A57"). In essence I need to hide rows Alastline to A57. The code is below. Thanks for all the help.
Code:
Sub hiderows()
Dim myRowRange As Range
Dim myColRange As Range
Dim cell As Range
Sheets("peer").Select
peernum% = Range("peernum")
lastline% = 7 + peernum%
' Hide rows with no data
' Define which cells to look at to hide rows
Sheets("data").Select
Set myRowRange = Range("A" & lastline% : "A57")
For Each cell In myRowRange
If cell = 0 Then cell.EntireRow.Hidden = True
Next cell
End Sub