+ Reply to Thread
Results 1 to 2 of 2

Count if & ignore hidden rows

Hybrid View

jordan2322 Count if & ignore hidden... 01-24-2012, 10:51 PM
Domenic Re: Count if & ignore hidden... 01-24-2012, 11:56 PM
  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Question Count if & ignore hidden rows

    Hi guys,

    How do i get the following code to ignore any hidden rows within the target range?

        Range("E28").Select
        ActiveCell.FormulaR1C1 = _
            "=COUNTIF(Database!C5,""0%"")"
    regards

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Count if & ignore hidden rows

    Try...

    ActiveCell.Formula = "=SUMPRODUCT(SUBTOTAL(103,OFFSET(A2:A10,ROW(A2:A10)-ROW(A2),0,1)),--(A2:A10=0%))"
    Add the desired sheet reference and adjust the range, accordingly
    Last edited by Domenic; 01-25-2012 at 12:04 AM. Reason: Changed the function number for the SUBTOTAL function...

+ 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