auto filter macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to use auto filter or some other device to hide
those rows whose first column has a zero in it. I would
like to come up with a macro that automatically does
this. The purpose is to have a sales order whose first
column of every row is the quanity of each item ordered.
If zero is ordered than that row would be hidden. This
sales order would be linked to a data input sheet where
the actual input would take place. Please help!!!
 
Try recording a macro (Tools > Macro > Record New Macro)
that apply an autofilter (Data > Filter > AutoFilter) to
your sheet and filter for "0" in column A.

HTH
Jason
Atlanta, GA
 
This will do it. If you want to hide, use as is, to delete change the
comment line

Sub delblanks()
With Range("a2:a" & Cells(65536, "a").End(xlUp).Row) 'Selection
'.SpecialCells(xlBlanks).EntireRow.Delete
.SpecialCells(xlBlanks).EntireRow.Hidden = True
End With
End Sub
 
to filter non-blanks
Sub filteroutblanks()
Range("A13:C18").AutoFilter Field:=1, Criteria1:="<>"
End Sub
 
Back
Top