There isn't anything in excel to do this, but you can define complex print areas. the following macro will select every row where the 5th column has a 1 (rows between 2nd and 1000 anyway)
once selected, use the print area set feature. Excel can also hide rows (or columns) from view and print (actually it sets the row height=0). use whichever meets your needs best.
Sub selectrows()
Dim str
For i = 2 To 1000
If ActiveWorkbook.Worksheets("sheet1").Cells(i, 5) = 1 Then
str = str & i & ":" & i & ","
End If
Next i
str = Left(str, Len(str) - 1)
Stop
'Range("7:7,10:10,12:12,13:13,15:15,19:19,20:20,22:22").Select
ActiveWorkbook.Worksheets("sheet1").Range(str).Select
End Sub