+ Reply to Thread
Results 1 to 2 of 2

count unique cells in range based on date

  1. #1
    Registered User
    Join Date
    10-08-2007
    Posts
    1

    count unique cells in range based on date

    I have a spreadsheet with names in column A and dates in column B, for example:

    A(names) B(dates)
    Mary 1/1/2007
    John 1/1/2007
    Joe 1/5/2007
    Mary 1/6/2007
    Jim 2/1/2007
    John 2/1/2007
    Joe 2/2/2007

    I am planning to do this using named ranges to simplify the function.

    I am looking for either a worksheet function or macro that I can use to count the number of unique names, that appear within a specified date range e.g (1/1/2007-2/1/2007). -- In this example: 3 (Mary, John, Joe), I only need the count. I also need the count to display in a single cell in a monthly report (for each month I can show the unique number of people that were active)

    So far, I have managed to count unique items in column A using: =SUMPRODUCT(1/COUNTIF(B1:B30,B1:B30))
    and count items in the date range: =COUNTIF(A1:A36,">"&DATE(2007,1,1))-COUNTIF(A1:A36,"<"&DATE(2007,2,1))
    but I can't figure out how to count the unique items in column A by specifying the date range in column B.

    I greatly appreciate any ideas you have.

    Thanks.
    Dave

  2. #2
    Registered User
    Join Date
    08-10-2007
    Posts
    34

    Same Problem

    I looked thro the forums to find my question, and I'm in the same boat as Dave. I'm trying to count unique entries in column C, and sort them by column A. Column A has 17 different classifications, listed in A2:A19. This was my attempt, but results in the #value error, becuase the second array returns 117 instead of a 1 or 0.

    =SUMPRODUCT(--('Calculated Data'!$C$2:$C$10000=A2),--(COUNTIF('Calculated Data'!$C$2:$C$10000,A2)))

    Thanks in advance,

    `engineers08

+ 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