View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_6_] Otto Moehrbach[_6_] is offline
external usenet poster
 
Posts: 201
Default Macro to hide rows.

One way:
Say that Column B is the column that contains the criteria for hiding the
rows. That is, you want to hide all the rows that are blank in Column B.
Say your data goes from B1 to B50. Select B1:B50. Hit the F5 key (the GoTo
key), click on Special at the bottom of the GoTo box. Click on the radio
button for blanks. Click OK. All the blank cells in B1:B50 will now be
selected. Run the following macro. It will hide all the rows that are
blank in B1:B50.
HTH Otto
Sub HideBlankRows()
Dim i As Range
For Each i In Selection
i.EntireRow.Hidden = True
Next i
End Sub
wrote in message
...
The document is a fax form.
-----Original Message-----
What do you want to do with the rows that are left

visible. Do you want to
print them? Copy them? Just look at them? HTH Otto
"Steve" wrote in

message
...
I have a stock order form. I want to find a way to hide
rows containg items that do not need to be ordered. for
example:

A B
1 paper 2
2 ink
3 pens 4
4 staples

Is there a macro that can filter out empty quantity

celss
and hide the whole row (rows 2 and 4 in this instance)?
I appreciate your time and effort.
Steve.



.