+ Reply to Thread
Results 1 to 3 of 3

Count Number of Unique Dates For Employee Name

  1. #1
    Registered User
    Join Date
    02-18-2007
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    25

    Count Number of Unique Dates For Employee Name

    Without VBA, we need to count the number of dates on which an employee completed at least one task. In other words, in the case where the employee completed more than one task on a single date, it only counts as one date for that employee. So we need the number of dates not the number of tasks.

    We don’t need to know how many times a name appears rather how many unique dates contain that unique name.

    The workbook has employee names in column ‘A’ and dates in column ‘B’. The problem we have is that the same date can occur many times in column ‘B’ and an employee name can re-occur several times on the same date.

    A very small sample from seven thousand rows is below;
    Row A B C
    302 Bob 7/20/2012
    303 Dan 7/20/2012
    304 Bob 7/20/2012
    305 Dan 7/20/2012
    306 Bob 8/3/2012
    307 Cindy 8/3/2012

    If the formula works correctly, in the above sample, Bob’s results would be two, while Dan would be one.

    Kind Thanks,
    Eddie

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Count Number of Unique Dates For Employee Name

    If you are using Excel 2007 or later use
    =COUNTIFS($A$1:$A$6,A1,$B$1:$B$6,B1)

    Else use
    =SUMPRODUCT(--($A$1:$A$6=A1),--($B$1:$B$6=B1))

    where Column A has the names and column B has the dates. Adapt the ranges accordingly

    And update your profile to mention the Excel version. As you can see, it helps!
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Count Number of Unique Dates For Employee Name

    Array confirmed with Shift Ctrl Enter

    =SUM(SIGN(FREQUENCY(IF($A$2:$A$10="Bob",$B$2:$B$10),IF($A$2:$A$10="Bob",$B$2:$B$10))))

    Replace "Bob" with an appropriate cell reference and expand the ranges to suit your real data.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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