View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt[_39_] Matt[_39_] is offline
external usenet poster
 
Posts: 27
Default Count Visible Range?

I know there are lots of ways to do this procedure, but I was hoping
there might be something already defined.

I have a macro that filters out multiple rows based on certain
criteria. What I'd like to do is use a conditional statement to
determine if there are no remaining visible rows in the used range.

If Worksheets("Sheet 1").UsedRange.Rows.SpecialCells(xlVisible).Coun t =
0 Then
'More code here
End If

Worksheets("Sheet 1").UsedRange.Rows.SpecialCells(xlVisible).Coun t
evaluates, but not to the corrent value (when no rows in the used range
were visible it evalutated to 10560)

Seems to me like this should work, but its not.

Any help would be wonderful