View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default creating autofilter and using them thanks VBA

Hi Maileen,

Try adapting the code obtained from the macro recorder when doing this
manually.

See also Debra Dalgeish's Autofilter pages, particularly her Autofilter
Programming page at:

http://www.contextures.com/xlautofilter03.html

---
Regards,
Norman



"Maileen" wrote in message
...
hi,
I would like to know how can i create autofilter using VBA ?
after that, i would like to ue these filters with some criteria, but once
again i don't know how to do it.

for example :
i have a sheet with 2000 records.
1st step : sort all records by sorting columns A and B in ascending order.
Like we do using Data\Sort in the excel menu.
2nd step : create autofilters on the first row for all columns. like we do
using Data\autofilters.
3rd step : filter all records, using filtering criteria for column A and
column B
4th step : get count of how many records are displayed thanks these
filters.

thanks a lot,
maileen