+ Reply to Thread
Results 1 to 13 of 13

Sumproduct & Count Distinct

  1. #1
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Sumproduct & Count Distinct

    Good afternoon,

    I'm looking for a formula where I can use multiple criteria then count unique values in a column.

    For example we have 3 columns

    Column A = Date
    Column B = Hour
    Column C = Staff

    I want something like
    Please Login or Register  to view this content.
    So if the table looked like this

    A B C
    26/11 8 John Smith
    26/11 8 David White
    26/11 8 John Smith

    I would want the answer to come back with 2 (2 Unique Entries in Column C)

    Thanks in advance

    DJ

  2. #2
    Registered User
    Join Date
    02-27-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Sumproduct & Count Distinct

    What about a pivot table?
    Attached Files Attached Files
    Last edited by kimrh; 11-26-2013 at 08:40 AM.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumproduct & Count Distinct

    if you use a helper & hidden column..

    In d1 and copy down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then use column D as reference.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Sumproduct & Count Distinct

    I did think of that but I think the pivot would be too big. The data above is an example only, For the real data in the sum product itself i'm looking at 6 different columns before the unique count column and the date range is over a month of dates each with 13 hours that i'm interested in

  5. #5
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Sumproduct & Count Distinct

    Fotis1991 Thanks for your reply. I think we are on the right track but the problem is im not just looking for something where the helper is = 1 this is because I have multiple dates in one data set. So for example an agent had taken a call at 8am on the 25/11/13 And again on the 26/11/13 the second one wouldnt show as the helper would show this value to be 2.

  6. #6
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Sumproduct & Count Distinct

    This would work if we could count the helper instead as each value is unique

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumproduct & Count Distinct

    If you use cell reference rather that "26/112013"?

    Of course would be extremely useful to upload a small sample workbook!

  8. #8
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Sumproduct & Count Distinct

    Ok I will upload an example, Should be here within 10 minutes. Thanks

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Sumproduct & Count Distinct

    Try this........

    Please Login or Register  to view this content.
    Please find the attached sheet to see if this is what you want.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  10. #10
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Sumproduct & Count Distinct

    example.xlsx Hopefully this is attached. Thanks

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumproduct & Count Distinct

    So in N4 and copy down use this.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then in C4 and copy down and across use this one.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Sumproduct & Count Distinct

    Thank you, It worked fine

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumproduct & Count Distinct

    You are welcome and thanks for the feedback & rep.

+ 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. Distinct count using vba
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2012, 07:54 AM
  2. Count distinct?
    By Africa in forum Excel General
    Replies: 4
    Last Post: 12-09-2011, 08:34 AM
  3. [SOLVED] How do I count distinct names?
    By Rona in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-08-2006, 10:25 PM
  4. Count Distinct only
    By John Moore in forum Excel General
    Replies: 4
    Last Post: 11-25-2005, 07:50 AM
  5. [SOLVED] Count Distinct Values?
    By bill_morgan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-26-2005, 10:06 PM

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