+ Reply to Thread
Results 1 to 4 of 4

Count Unique Values Based on Earliest Date Criteria

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    49

    Count Unique Values Based on Earliest Date Criteria

    Hi,
    I have new customer data:

    Sales Rep #, Cust #, Cust Name, Year, Month, Date, Revenue (Table in Range (“A:G”)

    I need to get New Customer Revenue and New Customer Count for each Sales Rep per year.
    Revenue is an easy part; I am struggling with the new customer count because if sales rep 1 opened a new account “AAA” in February, there could be scenario that sales rep 2 starts selling to the same account “AAA” in March, I am counting the revenue sales rep 2 brings towards new customer revenue, but he (sales rep 2 ) is not supposed to get a new customer count credit (otherwise I will be overstating the number of new customers ), so only sales rep 1 should get a new customer count credit because he was the one who started selling first (Rows 12:13)
    There also could be a rare scenario when 2 sales people start selling to a new customer at the same time (rows 14:15), I that case I want to give a new customer count credit to both.
    In the file attached- Columns ” M:O” show results of using COUNIFS formula – it will significantly overstate new site counts , I would need to get results in columns “S:U”

    Thanks!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Count Unique Values Based on Earliest Date Criteria

    I did this with a helper column, which you cant hide if you want.

    In H2, copied down...
    =IF(COUNTIF($C$2:C2,C2)>1,"",A2)

    Then for teh count...
    =COUNTIFS($H$2:$H$16,$M2,$D$2:$D$16,N$1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-18-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Count Unique Values Based on Earliest Date Criteria

    Thanks a lot!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Count Unique Values Based on Earliest Date Criteria

    Happy to help and thanks for the feedback

    Now that you have the helper, you could probably use that to do the sum as well

+ 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] Access Query: Need unique values and earliest date.
    By AlphaSkidz in forum Access Tables & Databases
    Replies: 18
    Last Post: 02-09-2014, 07:41 AM
  2. [SOLVED] Count unique values in columns based on 2 criteria
    By t83357 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-12-2013, 04:33 PM
  3. Count unique values based on several criteria
    By evilgrin in forum Excel General
    Replies: 2
    Last Post: 10-10-2010, 03:50 PM
  4. Count unique values based on matching criteria
    By gromitw in forum Excel General
    Replies: 9
    Last Post: 01-10-2007, 08:59 AM
  5. how to count unique values in excel based on criteria
    By Jorge in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2005, 10:06 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