+ Reply to Thread
Results 1 to 2 of 2

getting a runtime error on a line

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    getting a runtime error on a line

    what the code below is doing is it is counting the rows in a named range

    then it is counting the number of visible cells in that range

    the error comes when there are no visible cells in the range,

    please advise on how to avoid this the solution should result in tt = 0 so the code will GoTo clear1

    Please Login or Register  to view this content.
    Last edited by scott.s.fower; 01-30-2013 at 09:01 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: getting a runtime error on a line

    Why not use Application.CountIf with the same criteria as the filter?

    That should give you the no of visible rows, which you can subtract from the total rows to find the hidden rows.
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1