+ Reply to Thread
Results 1 to 6 of 6

Counting data sets based on multiple criteria

  1. #1
    Registered User
    Join Date
    04-29-2010
    Location
    Del Rio, TX
    MS-Off Ver
    Excel 2003
    Posts
    3

    Counting data sets based on multiple criteria

    Hi,
    I have been trying to figure out a formula that will allow me to count people in my data set by age, gender, and ethnicity. does anyone know what kind of formula i use and how to go about writing it? For instance, I want to know how many people (out of 679) are 15y/o, Female, and Hispanic. Thank you!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Counting data sets based on multiple criteria

    If you are looking for specific information, then use Sumproduct

    e.g. =Sumproduct(--(AgeRange=Age),--(GenderRange=Gender),--(EthnicityRange=Ethnicity))

    replace ranges and references with actual cell ranges and cell references...

    If you want to create a summary table, have a look at Pivot Tables.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-29-2010
    Location
    Del Rio, TX
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Counting data sets based on multiple criteria

    Thank you. I tried that formula, and it works, but I get an incorrect count. When the output should have been 2, I got 0....any idea why? This has been my main problem all along...

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Counting data sets based on multiple criteria

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  5. #5
    Registered User
    Join Date
    04-29-2010
    Location
    Del Rio, TX
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Counting data sets based on multiple criteria

    Attached is an example of my spreadsheet. I want to count
    # of 12y/o white females
    # of 12 y/o hispanic females
    # of 13 y/o white males
    # of 13 y/o hispanic males,
    etc.
    In other words, I want a formula that counts a particular set of data only if it contains all three of the criteria--age, gender, ethnicity-- that I input.
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Counting data sets based on multiple criteria

    Check formulas in column K
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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