+ Reply to Thread
Results 1 to 5 of 5

Count unique values on a specific date

  1. #1
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Norway
    MS-Off Ver
    Excel in Office 365
    Posts
    147

    Count unique values on a specific date

    Hello, again I need help from you guys. This time I want to count active customers at December 31st every year (2008-2013). Most customers are listed twice on specific dates, but I want to count each customer only once on the specific date (31.12.13). One thing that complicates it a lot is that some customers has term period some other date than 31st each year so that I cannot use 31st as a sorting element. Customer 2 has for example a term period 14. march each year, but it is still active 31st each year. Customer 3 has term period in february. This customer was active in february 2013, but inactive december 2013. I will therefor not count customer 3 as of 31st of December 2013.
    I have attached a sample data.

    Anyone?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-22-2014
    Location
    genoa, italy
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Count unique values on a specific date

    hi,
    does the attached file do what you want ?
    rgds,
    AL
    customers_AL.xlsx

  3. #3
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Norway
    MS-Off Ver
    Excel in Office 365
    Posts
    147

    Re: Count unique values on a specific date

    I figured out a way to count the unique customers. But the problem I am now facing is to count the relevant customers. I need to count only the active customers on 31st of each year. Since they all have different periods it makes it difficult. For example: Customer 2 is active on
    22.February 2013 and since it doesīt have an inactive date it is thus active on 31st of December 2013. Customer 3, however, is active 22nd of
    February 2013, but inactive 1st of December 2013, so therefor I canīt count customer 3 in 2013. I have attached a new file.

    Hopefully somebody understands my challenge.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Count unique values on a specific date

    Hi
    For that I used helper column. The helper column formula
    =INDEX($C$2:$C$24,MATCH(MAX(IF(($A$2:$A$24=A2)*(YEAR($B$2:$B$24)=YEAR(B2)),$B$2:$B$24,"")),IF(($A$2:$A$24=A2)*(YEAR($B$2:$B$24)=YEAR(B2)),$B$2:$B$24,""),0)) CSE

    To Count Unique Customers
    =SUM(IF(FREQUENCY(IF((YEAR($B$2:$B$24)=E3)*($D$2:$D$24="Yes"),MATCH($A$2:$A$24,$A$2:$A$24,0)),ROW($B$2:$B$24)-1),1))

    Both of them are array formulas.

    (Second formula is not my combination. Learned yesterday from this site but forgot user's name.)
    Attached Files Attached Files
    Appreciate the help? CLICK *

  5. #5
    Forum Contributor
    Join Date
    10-31-2012
    Location
    Norway
    MS-Off Ver
    Excel in Office 365
    Posts
    147

    Re: Count unique values on a specific date

    Thanks - that is an awesome formula. It looks like it works perfectly. I need to check it out on my entire data range (appr. 9000 rows) when I get to work on Monday.

+ 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. Count unique values within a range that meet a specific condition
    By CSS in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 06-24-2013, 02:00 PM
  2. Count unique values with specific criteria
    By kaz_jones in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 03:56 PM
  3. Replies: 0
    Last Post: 08-09-2010, 02:09 PM
  4. count unique values in columns based on date values
    By cclntn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2010, 06:16 PM
  5. Count unique records for a specific date
    By Mallycat in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-22-2010, 07:13 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