+ Reply to Thread
Results 1 to 4 of 4

Count only visible cells containing text

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    nashville, tn
    MS-Off Ver
    Excel 2010
    Posts
    23

    Count only visible cells containing text

    MeterReads QTR (Jan Mar 2014)test.xlsx

    I am trying to count all devices by model on sheet1 (FY13 4th QTR Meter Reads) into cell B524. The range is D2:D519.

    Where I run into trouble is when I filter the data by Campus, I only want excel to count the number of devices for the model listed (A524) and place it into B524 for the visible rows.

    The current formula I'm using is:

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(D2:D519,ROW(D2:D519)-MIN(ROW(D2:D519)),,1))*D2:D519=A524)

    Can someone tell me what it is that I'm doing wrong? Any help would be greatly appreciated..

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count only visible cells containing text

    Maybe like this...

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(D2:D519,ROW(D2:D519)-MIN(ROW(D2:D519)),,1)),--(D2:D519=A524))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    12-04-2013
    Location
    nashville, tn
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Count only visible cells containing text

    Quote Originally Posted by Tony Valko View Post
    Maybe like this...

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(D2:D519,ROW(D2:D519)-MIN(ROW(D2:D519)),,1)),--(D2:D519=A524))

    That's it!! Thanks Tony!!!

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count only visible cells containing text

    You're welcome. Thanks for the feedback!

+ 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. Replies: 5
    Last Post: 03-06-2015, 07:06 AM
  2. [SOLVED] changing a current mod (count unique visible cells ->count unique visible cells criteria
    By liranbo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2012, 03:58 AM
  3. Count Visible Cells Within A Variable Range
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2010, 04:21 PM
  4. Count Visible Cells Within A Selection
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-25-2010, 10:20 AM
  5. count only visible cells
    By bnkone in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-30-2006, 08:45 PM

Tags for this Thread

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