+ Reply to Thread
Results 1 to 3 of 3

Using a list of options and countifs

Hybrid View

  1. #1
    Registered User
    Join Date
    10-06-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2010
    Posts
    78

    Using a list of options and countifs

    I have a list of sales and sales people (see attached excel file). In my head I know that certain reps only sell a certain product. I just want to count the number of sales made for each rep by date and by product.

    For Example:
    Scott - Product1
    Cory - Product1
    Sam - Product2
    Ryan - Product1
    Jerret - Product2

    I don't want to use an equation like:
    =COUNTIFS(Table1[REP],"Scott")+COUNTIFS(Table1[REP],"Cory")+COUNTIFS(Table1[REP],"Ryan")
    because the real problem is much more complex.

    I wish I could say:
    =COUNTIFS(Table1[REP],OR(Scott,Cory,Ryan))
    but of course this doesn't work.

    Is there a way I can use a list of names in a single countifs function or some other function?

    Thanks
    Attached Files Attached Files
    Last edited by perducci; 01-31-2012 at 06:36 PM.

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

    Re: Using a list of options and countifs

    Try:

    =SUM(COUNTIFS(Table1[REP],{"Scott","Cory","Ryan"}))

    If you create a list in a column somewhere of matches to count then use something like:

    =SUMPRODUCT(COUNTIFS(Table1[REP],J2:J4))

    where J2:J4 contains the shortlist of names
    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
    10-06-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Using a list of options and countifs

    Really cool to finally have a solution, this problem has been recurring in my work and this will speed me up a ton.

    Thanks!

+ 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