+ Reply to Thread
Results 1 to 6 of 6

Counting number of unique dates per month in a list of duplicate dates

  1. #1
    Registered User
    Join Date
    04-22-2013
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    2

    Counting number of unique dates per month in a list of duplicate dates

    I have a list of dates when an exercise is taking place, I want to count the number of unique dates in the month that have been selected, for each month...eg:

    Date of exercise
    10/06/2013
    27/06/2013
    24/06/2013
    24/06/2013
    27/06/2013
    27/06/2013
    11/06/2013
    27/06/2013
    10/06/2013
    27/06/2013
    20/07/2013
    17/07/2013
    14/07/2013
    14/07/2013
    17/07/2013
    17/07/2013
    11/07/2013
    17/07/2013
    20/07/2013

    Data I want to gather would be number of exercises booked for June, and number of exercises booked for July assuming 1 exercise per date.
    Can anyone offer any advise of the best formula to use to achieve this?

    I have tried several formulas (sumproduct, Frequency, countif) but can't get the right combination to achieve my overall goal.

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Counting number of unique dates per month in a list of duplicate dates

    Assuming the Date of Exercise starts in A1, I would insert a helper column in B1, using this formula in B2 and dragging down:
    =if(countif($A$1:A1,A2)=0,1,0)

    You can then Sum column B to get the total # of unique values.
    Please click the * icon below if I have helped.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Counting number of unique dates per month in a list of duplicate dates

    This array formula will give you the number of different June dates

    =COUNT(1/FREQUENCY(IF(MONTH(A2:A20)=6,A2:A20),A2:A20))

    confirmed with CTRL+SHIFT+ENTER

    Note: it's not year specific so if you only want June 2013 change to this version

    =COUNT(1/FREQUENCY(IF(TEXT(A2:A20,"mmm-yy")="jun-13",A2:A20),A2:A20))
    Audere est facere

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Counting number of unique dates per month in a list of duplicate dates

    Try something like this...

    For the unique dates in the month of June (month #6)...

    Array entered**:

    =SUM(IF(FREQUENCY(IF(MONTH(A2:A20)=6,A2:A20),A2:A20),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    04-22-2013
    Location
    Nottingham
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Counting number of unique dates per month in a list of duplicate dates

    Thanks! This worked!
    Wish I had thought to come on here 3 hours ago!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Counting number of unique dates per month in a list of duplicate dates

    You're welcome. Thanks for the feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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