+ Reply to Thread
Results 1 to 8 of 8

How can I use Countif based on the frequency of a certain column?

  1. #1
    Registered User
    Join Date
    01-09-2012
    Location
    Bucharest
    MS-Off Ver
    Excel 2010
    Posts
    6

    How can I use Countif based on the frequency of a certain column?

    Hi,

    I am stuck in something, probably because of the simple fact that I don't understand exactly how Frequency functions works inside of a COUNTIF or SUMIF.

    I need to count the number of unique values in Column A, but dependent on some IFs for other columns, for example, in my printscreen attached, I need to see:

    1. For Month 8, for Category A, for Time with "CAT", how many IDs do I have? For example, for ID "159" I should get value of "1" because I have at least one row having values Month-8, Time with-CAT and Category-A

    Or

    for ID 166 I should get only value "1" if I want to measure Month-9, Time with-Closure, Category-A

    Sorry for my poor exaplanation Thanks for helping


    Printscreen.jpg

  2. #2
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: How can I use Countif based on the frequency of a certain column?

    Is this what you were looking for?

    I used COUNTIFS to find all of the criteria you wanted.


    Simeon
    Attached Files Attached Files
    Don't forget to click the star in this post!

  3. #3
    Registered User
    Join Date
    01-09-2012
    Location
    Bucharest
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How can I use Countif based on the frequency of a certain column?

    Hi Simeon,

    Thank you for being so promptly. It is slightly different, because if it was like that then I could have easily used just COUNTIFS.

    But as you can see, in your file you replaced column D/row 4 with "CAT" instead of "Business' and that's why he founds the value.
    What I'm interested is even though it had "Business" written there, to search if somewhere along the road for ID 159 he also had value "CAT" at some point in time

  4. #4
    Registered User
    Join Date
    01-09-2012
    Location
    Bucharest
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How can I use Countif based on the frequency of a certain column?

    This formula should work like a pivot that has

    1. in the "Report filter" section all these fields: Month, Time With, Category
    2. in the "Row Labels" should have the: ID

    And whatever I filter in the "Report Filter" should do me a Count of the ID column in the pivot

  5. #5
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: How can I use Countif based on the frequency of a certain column?

    I think I understand now.

    I put in a search bar at the top. When you enter thae data you want to filter out and run the macro with the filter button the Count on the far left will give you the individual number if ID's. I hope this is what you were asking for. If not just let me know!


    Simeon
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-09-2012
    Location
    Bucharest
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How can I use Countif based on the frequency of a certain column?

    Hi,

    Thanks again, this surely is a progress but still not helping me to fully potential, because I don't want to populate fields based on the ID.


    I am attaching a file "Example.xlsx" with all my data in columns A:E and the table I need to populate in columns J:O I(leaving the red cells as what I need to populate).

    I have completed manually K7:K9 as an example. I need some kind of formula that will automatically bring me these, because I have a lot of tables like this that I need to populate with the volumes, which I am going to use further in other formulas.

    Thanks for checking this,
    Dan
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: How can I use Countif based on the frequency of a certain column?

    Ok,

    This should get you what you are looking for!
    The file is to big to upload but here is the code Part 1.

    Please Login or Register  to view this content.
    This worked on the example that you posted.


    Simeon

  8. #8
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003/2007
    Posts
    145

    Re: How can I use Countif based on the frequency of a certain column?

    Code Part 2

    Please Login or Register  to view this content.

+ 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