+ Reply to Thread
Results 1 to 2 of 2

VBA: Count values on a Filtered data set

  1. #1
    Forum Contributor
    Join Date
    02-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    102

    VBA: Count values on a Filtered data set

    Hello,

    The below command works fine for a non-filtered data set. Is there an option to calculate result of a data set which is filtered

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,912

    Re: VBA: Count values on a Filtered data set

    Sure
    1) add in all the conditions that you use for filtering
    2) use a sumproduct that incorporates SUBTOTAL to only operate on visible cells
    3) add a column of SUBTOTAL functions that will return 1 if they are visible, and add that condition to the countifs

    Note that you don't need to build a string and use evaluate to take advantage of countifs - Application.Worksheetfunction.Countifs is available for use within VBA
    Last edited by Bernie Deitrick; 02-12-2014 at 03:12 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. get a count of filtered data , count should be as values in cell.
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2012, 06:31 PM
  2. [SOLVED] Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  4. Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. [SOLVED] Count Intervals of Filtered TEXT values in Column and Return Count across a Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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