+ Reply to Thread
Results 1 to 6 of 6

Count Unique values if they fall between a date range

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Count Unique values if they fall between a date range

    I am a novice user and can't figure out the formula to my problem. I want a fomula to return a count based on if the entry falls between two dates. The caveat is I only want the count of unique "Job ID". I have attached an example. There are a total of 30 entries on Sheet 2 but only 25 of them have unique "Job ID". I figured out the fomula to count between the date ranges.

    =COUNTIFS(Sheet2!$D$2:$D$31,">="&$A2,Sheet2!$D$2:$D$31,"<="&$B2)

    I also figured out the formula for counting the unique entries.

    =SUM(IF(FREQUENCY(Sheet2!A2:A31,Sheet2!A2:A31)>0,1))

    Just not sure how to put them together so the work. Any help would be appreciated.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Count Unique values if they fall between a date range

    how about an pivot table.

    see the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    11-26-2012
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Count Unique values if they fall between a date range

    A pivot table will not work for what I am trying to do.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Count Unique values if they fall between a date range

    1) Why not?

    2) Have you looked at my file?

  5. #5
    Registered User
    Join Date
    11-26-2012
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Count Unique values if they fall between a date range

    The data I attached is sample data. It is all part of a bigger yearly team tracker which I use and I don't want to change the format of my tracker. Thank you for your suggestion and yes, I did look at your file, just not interested in using a pivot table.

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Count Unique values if they fall between a date range

    there is a discrepancy in your data. on Sheet1, all Date entries but one are actually Date, where as the value in B2 is Date AND Time. the way Excel handles Date and Time, 16-12-12 is actually 16-12-12 12:00:00 AM, which does not evaluate to TRUE in the comparison ">= 16-12-12 12:20:00 PM", even though the Date part of the data are the same.

    do you really need to compare the Time stamps, too?

    if not, use the following formula:

    Please Login or Register  to view this content.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

+ 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