+ Reply to Thread
Results 1 to 3 of 3

SUM number of VISIBLE occurrences of a given term, filtered rows

  1. #1
    Registered User
    Join Date
    01-04-2018
    Location
    Surrey, British Columbia
    MS-Off Ver
    Excel 2013
    Posts
    8

    SUM number of VISIBLE occurrences of a given term, filtered rows

    Hi all, I've been unable to find a solution to this on this forum or Google...

    I have a table ('Member Data'!$AF$10:$AF$75945) where I want to add up the number of occurrences of the term "Community Talk" in a particular column (G), but only for visible rows (the table gets filtered).

    I thought I was on the right track with a helper column (AF) that was =IF(G10="Community Talk","1","") and then SUBTOTAL that (=SUBTOTAL(109, 'Member Data'!$AF$10:$AF$75945), but nothing comes up. The SUBTOTAL function works if I manually enter 1's into the column AF, but it doesn't recognize the results of the IF function as a number to SUM. I'm not sure if the formatting affects this, but I tried changing it to Number with no luck.

    Thank you in advance for any suggestions!

    Randy
    Last edited by RandyStone; 03-23-2018 at 01:38 PM. Reason: SOLVED

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: SUM number of VISIBLE occurrences of a given term, filtered rows

    Formatting does NOT affect it, but you're on the right track that it's not treating it as a number, because you're not returning the number 1 with your IF, you are returning the text string "1". Yes, those are different and yes it matters, LOL.

    this would work instead:
    Please Login or Register  to view this content.
    Then use this for the summation:
    Please Login or Register  to view this content.
    AGGREGATE with function 9 (sum) and option 5 (ignore hidden rows) will do what you want.
    Last edited by ben_hensel; 03-22-2018 at 08:08 PM. Reason: misspelled code tag
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Registered User
    Join Date
    01-04-2018
    Location
    Surrey, British Columbia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: SUM number of VISIBLE occurrences of a given term, filtered rows

    Looks like it was the quotation marks in my helper column that screwed things up.

    =SUBTOTAL(109, 'Member Data'!$AF$10:$AF$75945) works fine now. Is there any benefit to the AGGREGATE function over it? It seems the SUBTOTAL will ignore hidden rows anyway.

    Thanks for your help!

+ 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. [SOLVED] Remove Visible Rows from Filtered Table
    By dflak in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 01-29-2018, 12:28 PM
  2. [SOLVED] Selecting the first x visible rows of a filtered table
    By DreamEyes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-27-2017, 11:05 AM
  3. [SOLVED] Format Filtered Visible Rows of Table
    By Redled89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2017, 12:40 AM
  4. Copy Filtered Data on visible rows
    By jamesbrightwell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2015, 01:31 AM
  5. Need some help on dynamic dropdow for filtered row or for visible rows only
    By dvpnp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2013, 12:21 PM
  6. Row number of first visible cell in a filtered range
    By rcdgreat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2012, 06:30 PM
  7. Excel 2007 : Copy Visible Filtered Rows between worksheets
    By lmsexcelforum in forum Excel General
    Replies: 0
    Last Post: 05-17-2009, 12:40 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