+ Reply to Thread
Results 1 to 7 of 7

Counting Unique dates and names

  1. #1
    Registered User
    Join Date
    03-20-2014
    Location
    London, England
    MS-Off Ver
    MS Office 365 (Version 2412)
    Posts
    51

    Counting Unique dates and names

    Hi,

    In the attached sheet I am trying to count how many unique days each individual has worked from some raw data which timestamps every field visit that they make.

    I need a formula that will return the results shown in cells C3 and C4 of the 'Tracker' tab.

    Any suggestions?
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Counting Unique dates and names

    c3=SUMPRODUCT((MATCH(INT(Data!$A$2:$A$292)&Data!$B$2:$B$292,INDEX(INT(Data!$A$2:$A$292)&Data!$B$2:$B$292,0),0)=ROW(Data!$A$2:$A$292)-ROW(Data!$A$2)+1)*(Data!$B$2:$B$292=$B3))
    Try this and copy towards down
    the result shown by you in C3 is 13 where as the result showing as 12
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,177

    Re: Counting Unique dates and names

    Try:

    =SUMPRODUCT((Data!$B$2:$B$292=Tracker!B3)/COUNTIFS(Data!$A$2:$A$292,">="&INT(Data!$A$2:$A$292),Data!$A$2:$A$292,
    "<"&INT(Data!$A$2:$A$292)+1,Data!$B$2:$B$292,Data!$B$2:$B$292))

  4. #4
    Registered User
    Join Date
    03-20-2014
    Location
    London, England
    MS-Off Ver
    MS Office 365 (Version 2412)
    Posts
    51

    Re: Counting Unique dates and names

    I'm trying to pop this formula into my larger file (and both of these formulas work perfectly in the example file that I uploaded so thank you) but I'm running into some problems with it.

    I made some minor alterations to it (see below) so it is referencing tabs with different names and some different cell ranges but when I update these it asks me to update the values for 'dump' and 'log'. This is what I have tried to use:

    =SUMPRODUCT((Data Dump!$B$2:$B$150000=Call Log!C5)/COUNTIFS(Data Dump!$A$2:$A$150000,">="&INT(Data Dump!$A$2:$A$150000),Data Dump!$A$2:$A$150000,
    "<"&INT(Data Dump!$A$2:$A$150000)+1,Data Dump!$B$2:$B$150000,Data Dump!$B$2:$B$150000))

    The only things I've changed from Phuocam's formula is the name of the two tabs (Dump is now Data Dump and Log is now Call Log), the ranges from 292 to 150000 and the cell where the persons name is.

    What am I doing wrong?

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Counting Unique dates and names

    or use below array formula (confirm with Ctrl+Shift+Enter) and copy towards down
    C3=SUM((FREQUENCY(IF(Data!$B$2:$B$292=$B3,INT(Data!$A$2:$A$292)),Data!$A$2:$A$292)>0)+0)


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Counting Unique dates and names

    In your case may be the below

    C3=SUM((FREQUENCY(IF(Data Dump!$B$2:$B$150000=$C5,INT(Data Dump!$A$2:$A$150000)),Data Dump!$A$2:$A$150000)>0)+0)

  7. #7
    Registered User
    Join Date
    03-20-2014
    Location
    London, England
    MS-Off Ver
    MS Office 365 (Version 2412)
    Posts
    51

    Re: Counting Unique dates and names

    Quote Originally Posted by nflsales View Post
    In your case may be the below

    C3=SUM((FREQUENCY(IF(Data Dump!$B$2:$B$150000=$C5,INT(Data Dump!$A$2:$A$150000)),Data Dump!$A$2:$A$150000)>0)+0)
    That worked (with the array) once I made another slight change to get rid of it asking for me to update the values:

    =SUM((FREQUENCY(IF('Data Dump'!$B$2:$B$150000=$C5,INT('Data Dump'!$A$2:$A$150000)),'Data Dump'!$A$2:$A$150000)>0)+0)
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Thanks guys

+ 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. Replies: 3
    Last Post: 04-19-2016, 09:38 PM
  2. Counting number of unique dates per month in a list of duplicate dates
    By Rackle83 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-22-2013, 10:15 AM
  3. Counting Unique names
    By dloconto in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-26-2013, 10:28 PM
  4. Counting Unique Names based on Criteria
    By adamsiskin in forum Excel General
    Replies: 7
    Last Post: 08-15-2012, 04:55 PM
  5. [SOLVED] Counting Unique Names
    By BRodgers25 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-09-2012, 11:50 AM
  6. Counting Unique Names
    By fieroetnl in forum Excel General
    Replies: 1
    Last Post: 10-13-2011, 07:01 PM
  7. Counting unique names with three column condition
    By moyounis in forum Excel General
    Replies: 9
    Last Post: 07-11-2011, 08:36 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