Thread: Hiding Rows
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Kurt[_7_] Kurt[_7_] is offline
external usenet poster
 
Posts: 7
Default Hiding Rows


Sub do_hide_rows()
Dim row As Integer
Dim rowrange As String
For row = 3 To 8 'your starting and ending rows here
If Cells(row, 5).Value = "" Then
rowrange = CStr(row) & ":" & CStr(row)
Rows(rowrange).Select
Selection.EntireRow.Hidden = True
End If
Next row
End Sub

Sub do_unhide_rows()
Rows("2:9").Select
'1 row before to 1 row after your range in do_hide_rows
Selection.EntireRow.Hidden = False
Range("B16").Select
End Sub


"james" wrote in message
...
Okay. So, at one point in time I used a spreadsheet that had a buttton
built
into the spreadsheet that made all rows with no data in column e
dissappear.
I am an idiot but i need to do this to my order forms. Then it had
another
button that made it reappear.