+ Reply to Thread
Results 1 to 5 of 5

Frequency Function with Multiple Criteria

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    34

    Question Frequency Function with Multiple Criteria

    Hello expert excel users. I need your assistance. I am trying to come up with a formula to count the number of primary vendors within several different categories.

    In column G I have the type of category.
    In column H I have listed if the vendor is primary or secondary
    In column I I have the unique vendor ID

    What I need to do is count the number of primary vendors within a category using the unique vendor ID column. I am guessing I need to use the frequency function but I am having issues adding multiple criteria to it.

    Thanks in advance for your help.

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

    Re: Frequency Function with Multiple Criteria

    You get better help if you add an excel file, without confidention information.

    Please add also the desired (expected) result.
    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
    04-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Frequency Function with Multiple Criteria

    Attached is a sample file. The result I want to show is:

    Carpet Cleaning: 3 unique vendor ID's
    Cleaning: 4 Unique vendor ID's
    Painting: 18 unique vendor ID's
    Attached Files Attached Files

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

    Re: Frequency Function with Multiple Criteria

    With 2 helpcolums and a pivot table.

    See the attached file.

    Editing:
    notice the result on cleaning is 5 (which is correct, while a blanc vendor is also an unique vendor).
    Attached Files Attached Files
    Last edited by oeldere; 05-08-2013 at 02:55 PM.

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

    Re: Frequency Function with Multiple Criteria

    Try this...

    Use cells to hold the criteria:

    X2 = Carpet Cleaning
    X3 = Cleaning
    X4 = Painting

    This array formula** entered Y2 and copied down to Y4:

    =SUM(IF(FREQUENCY(IF(A$2:A$81=X2,MATCH(C$2:C$81,C$2:C$81,0)),ROW(C$2:C$80)-ROW(C$2)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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