+ Reply to Thread
Results 1 to 10 of 10

Counting values in a filtered row

  1. #1
    Registered User
    Join Date
    12-21-2012
    Location
    Iowa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Counting values in a filtered row

    I am using an Excel 2007 spreadsheet where I would like to use the countif function to count values in rows if they meet certain criteria. The challenge is I also need to filter that data and the count only counts visible values. On a posting on the site, the following equation was offered - This workds great. The challenge is this only looks at one column.

    =(SUMPRODUCT(SUBTOTAL(3,OFFSET($G$2,ROW($G$2:$G$7)-ROW($G$2),0)),($G$2:$G$7=H10)+0))

    In a simplified form, my data is as follows. The above equation counts the number of occurances in the value column when filtered, but the first column dictates how many of those there are. The equation only counts each as a single value, where they must be multiplied by the first column. For example there are 3 2355's not just one.

    The question is how can I alter the above equation to look for the volume of the value and take that in to consideration when counting?

    Volume Value
    3 2355
    2 6433
    1 2346
    6 6433
    3 3463
    2 6433

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Counting values in a filtered row

    Maybe with an pivot table.

    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    12-21-2012
    Location
    Iowa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Counting values in a filtered row

    That is one way, but I need to have it in an equation as the filter can be changed across many columns. Is it possible to associate the given equation with both colunns?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Counting values in a filtered row

    Please Login or Register  to view this content.
    See the attached file.

    It is filtered on column A and filtered on column C.

    The result is in column B
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-21-2012
    Location
    Iowa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Counting values in a filtered row

    Thank you
    I didn't explain myself well. The values I'm trying to count are just like text. I don't want to do math with them, but count how many times they occur

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Counting values in a filtered row

    Please Login or Register  to view this content.
    See the yellow cell.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-21-2012
    Location
    Iowa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Counting values in a filtered row

    Thank you. I see that. Look at column C titled Name. That is a better example. For example counting the number of "all". That value occurs 3 times, but the volumes for each vary. Adding up the volumes, the count I am trying to get is 15, not 3

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Counting values in a filtered row

    See the orange cells.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-21-2012
    Location
    Iowa
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Counting values in a filtered row

    Thank you. I might be able to nest these two together to get what I'm after. Thanks for your help!

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Counting values in a filtered row

    Maybe you can show it in an example which result you want to achieve.

+ 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