+ Reply to Thread
Results 1 to 4 of 4

Filtering FREQUENCY on >1 criteria

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    far away
    MS-Off Ver
    Excel 2011
    Posts
    3

    Filtering FREQUENCY on >1 criteria

    In the attached example I have a simple data table (Table2) with three data columns: Color, Shape and Weight. I can make a count of the occurrence of Weight in defined Bins (in Table 5) using the array formula FREQUENCY

    {=FREQUENCY(Table2[Weight],Table5[Bin])}

    and can filter the count successfully in the array formula on the basic of one criteria (in G2):

    {=FREQUENCY(IF(Table2[Color]=$G$2,Table2[Weight]),Table5[Bin])}

    But if I try to filter on the basis of two criteria by using an AND statement in the FREQUENCY formula, it doesn't work:

    {=FREQUENCY(IF(AND(Table2[Color]=$G$2,Table2[Shape]=$G$3),Table2[Weight]),Table5[Bin])}

    Am I trying to do the impossible or do I need a particular syntax?


    Thanks in advance for any assistance

    example.xlsx

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Filtering FREQUENCY on >1 criteria

    Give this a try. Enter with Ctrl + Shift + Enter

    =FREQUENCY(IF($B$5:$B$14=G2,IF($C$5:$C$14=G3,$D$5:$D$14)),$I$5:$I$25)

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    far away
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: Filtering FREQUENCY on >1 criteria

    Yes, that did it. In my syntax:

    {=FREQUENCY(IF(Table2[Color]=$G$2,IF(Table2[Shape]=$G$3,Table2[Weight])),Table5[Bin])}

    Entered as array. (Cmd+shift+enter on a Mac)

    Many thanks!.......I am however curious to know why the version I tried didn't work. The logic seems the same!

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Filtering FREQUENCY on >1 criteria

    That just the way how array formula works; it doesn't like AND() function.

+ 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. Need to add more Criteria to a SUM(IF(FREQUENCY(IF statement
    By mlt9631 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-26-2012, 10:08 AM
  2. Frequency of two criteria
    By Smint in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2007, 12:22 PM
  3. frequency formula with criteria
    By seanc in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-13-2005, 06:25 AM
  4. Frequency of values with Criteria
    By Michelle Wong in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2005, 01:05 AM
  5. [SOLVED] trouble filtering a list. Why isn't column filtering?-number of criteria
    By Pat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-18-2005, 11:05 AM

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