Count Number of Filtered Records
Posted by JAF on March 15, 2001 7:24 AM
I have a small piece of code (part of a much larger macro) that runs an AutoFilter on a column of data.
What I need to do is after running the AutoFilter to generate a variable that is the value of the number of filtered entries - in Engish: If I have 17 filtered items that match the specified criteria, I need to generate a variable to the value of 17.
The code I'm using to run the AutoFilter is:
Selection.AutoFilter Field:=1, Criteria1:="New"
Any suggestions as to how I can count the number of filtered entries on my list?
NB: I know that I could use COUNTIF to get this number, but I really need to use the AutoFilter if at all possible.