+ Reply to Thread
Results 1 to 3 of 3

Countifs function using two variables; a specific name and the count of a type of thing

  1. #1
    Registered User
    Join Date
    05-25-2017
    Location
    Canada
    MS-Off Ver
    16
    Posts
    4

    Countifs function using two variables; a specific name and the count of a type of thing

    Hey all,

    I've been bashing my head off this problem for over 2 hours. I can NOT figure out how to return a countifs value based on my required criteria.

    For Example, say I have a table with 4 columns, Date, Name of person, Type of car, Number of cars (of that type):
    So for example, in my table:

    Jan 1, 2017 - Jeff - Buick - 6
    Jan 1, 2017 - Jeff - Nissan - 4
    Jan 2, 2017 - Jeff - Buick - 1
    Jan 3, 2017 - Jeff - Ford - 3
    Jan 2, 2017 - Steve - Chevy - 6
    Jan 3, 2017 - Steve - Buick - 3

    I want to return the number of different types of cars Jeff has Identified.

    I know the countifs will return a number based on two criteria, one his name, but how do I get the count of different cars he's spotted (not the total count). So I would need to return a value of 3 in this case, Jeff has seen 3 specific types of cars.

    =Sumifs([Tblname][name],"Jeff", where do I go from here?

    Thanks so much! So frustrating!

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Countifs function using two variables; a specific name and the count of a type of thin

    Assuming that the data is in the range A2:D7, an array entered formula* for yielding the number of types of cars seen by Jeff is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are activated by simultaneously pressing the Ctrl, Shift and Enter keys while the cell is in edit mode.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Countifs function using two variables; a specific name and the count of a type of thin

    Another way similar to JeteMc's. Assuming data is in A2:D7 and names are listed starting in A10 try this array entered formula in B10 and fill down. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Row\Col
    A
    B
    C
    D
    1
    Dates
    Names
    Makes
    Counts
    2
    1-Jan-17
    Jeff Buick
    6
    3
    1-Jan-17
    Jeff Nissan
    4
    4
    2-Jan-17
    Jeff Buick
    1
    5
    3-Jan-17
    Jeff Ford
    3
    6
    2-Jan-17
    Steve Chevy
    6
    7
    3-Jan-17
    Steve Buick
    3
    8
    9
    10
    Jeff
    3
    11
    Steve
    2
    Last edited by FlameRetired; 06-14-2017 at 11:40 PM.
    Dave

+ 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. [SOLVED] SUMPRODUCT IF(OR) type of thing
    By HalPlz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2016, 08:26 PM
  2. [SOLVED] Trying to make a database type thing
    By Knightz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2016, 11:17 AM
  3. [SOLVED] Countifs function to count cell color
    By DHBarkley in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-23-2016, 07:08 PM
  4. Replies: 6
    Last Post: 10-21-2015, 09:44 AM
  5. [SOLVED] Odd Type Mismatch with variables and the month function.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2013, 10:02 PM
  6. Replies: 6
    Last Post: 04-08-2013, 05:12 PM
  7. Excel calendar search macro - type thing
    By ksatoday in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2011, 06:26 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