Count filter results


Posted by sam on December 13, 2000 11:29 AM

I use both adv filter & autofilter but in both cases I need to miss the next part of the macro if the filter has nil returns, but I can't find a way of counting the results.
I've tried selecting them to count, but nil selects to the end of the sheet and consequently a useless value.
Can anyone suggest a method ?



Posted by Celia on December 13, 2000 3:57 PM


:

Check whether this works :-

On Error GoTo e
x = yourFilterRange.SpecialCells(xlCellTypeVisible).Count
e: MsgBox "There are no visible cells"