View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jason V[_2_] Jason V[_2_] is offline
external usenet poster
 
Posts: 22
Default Getting the count from autofilter

Thank you. Exactly what I wanted.
--
Jason V


"Ron de Bruin" wrote:

Hi Jason

Something like this after the code that do the filter

With ActiveSheet.AutoFilter.Range.Columns(1)
On Error Resume Next
Set rng = .SpecialCells(xlCellTypeVisible)
On Error GoTo 0
If Not rng Is Nothing Then MsgBox rng.Cells.Count - 1
End With


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Jason V" wrote in message ...
I recorded a macro to use autofilter. I do not know how to access the count
of the result after filtering on a column. Let's say I have 10 rows and after
I filter only 2 rows show up. I want to access the result that gives me 2. I
think this is count but wha tis the code to get it.

Thanks
--
Jason V