+ Reply to Thread
Results 1 to 11 of 11

Need formula to Count the Date without duplicates

  1. #1
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Need formula to Count the Date without duplicates

    Hi All,

    Need help in counting the MTD count of date without the duplicates.

    My formula so far is, =COUNTIFS($A$5:$A$13,">="&($B$1)-(DAY($B$1)-1),$A$5:$A$13,"<="&($B$1),$C$5:$C$13,B2)

    the problem is it counts all the duplicate Dates.

    I attached here a sample excel file. hope it helps.


    Thanks!


    >>> Edit remarks: Kindly refer to the new attachment file in Post #10
    Attached Files Attached Files
    Last edited by mackypogi; 07-28-2015 at 11:17 PM. Reason: Added new file sample in Post #10

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Need formula to Count the Date without duplicates

    So basically you need to count the Unique Dates from Month Start till Today?
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Need formula to Count the Date without duplicates

    Quote Originally Posted by NeedForExcel View Post
    So basically you need to count the Unique Dates from Month Start till Today?
    Yes Correct!

  4. #4
    Registered User
    Join Date
    05-09-2015
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    Office2007
    Posts
    47

    Re: Need formula to Count the Date without duplicates

    Hi mackypogi

    The below formula will solve your problem I hope.

    Please Login or Register  to view this content.
    Also see the attached file.

    Thanks.

    Sakib
    Attached Files Attached Files

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Need formula to Count the Date without duplicates

    Try this -

    Please Login or Register  to view this content.
    ...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. Press F2 on that cell and try again.

  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: Need formula to Count the Date without duplicates

    Try this...

    B1 = today's date

    Enter this formula in C1. This will return the 1st of the month date.

    =B1-DAY(B1)+1

    Format as Date

    This array formula** entered in F5:

    =SUM(IF(FREQUENCY(IF((A5:A13>=C1)*(A5:A13<=B1),A5:A13),A5:A13),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.

  7. #7
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Need formula to Count the Date without duplicates

    Hi Sakib,

    It doesnt worked for me because I have a running Dates.

  8. #8
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Need formula to Count the Date without duplicates

    Quote Originally Posted by Tony Valko View Post
    Try this...

    B1 = today's date

    Enter this formula in C1. This will return the 1st of the month date.

    =B1-DAY(B1)+1

    Format as Date

    This array formula** entered in F5:

    =SUM(IF(FREQUENCY(IF((A5:A13>=C1)*(A5:A13<=B1),A5:A13),A5:A13),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.
    Hi Tony,

    This doesnt worked for be because I could have multiple Activity

  9. #9
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Need formula to Count the Date without duplicates

    Quote Originally Posted by NeedForExcel View Post
    Try this -

    Please Login or Register  to view this content.
    ...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. Press F2 on that cell and try again.
    Hi NeedForExcel,

    The formula dont have an error but it has a wrong result, does it matter if I reference into other worksheet?

  10. #10
    Registered User
    Join Date
    07-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Need formula to Count the Date without duplicates

    Hi ALL,

    I am trying to make it the same like the template I am working on. kindly see new attached file for sample
    Attached Files Attached Files

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

    Re: Need formula to Count the Date without duplicates

    Try this...

    Data Range
    A
    B
    C
    1
    Date :
    7/27/2015
    7/1/2015
    2
    3
    4
    Activity:
    Activity 1
    Activity 2
    5
    Monthly Count of Date
    3
    3


    Enter this formula in C1:

    =B1-DAY(B1)+1

    This array formula** entered in B5 and copied across to C5:

    =SUM(IF(FREQUENCY(IF((Sheet2!$A2:$A19>=$C1)*(Sheet2!$A2:$A19<=$B1)*(Sheet2!$C2:$C19=B4),Sheet2!$A2:$A19),Sheet2!$A2:$A19),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.

+ 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. Non-array formula to count non-duplicates
    By Dendrobates in forum Excel General
    Replies: 3
    Last Post: 04-06-2015, 06:30 PM
  2. Require a formula to count the duplicates as they appear in a list
    By john dalton in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-28-2014, 12:48 PM
  3. [SOLVED] Formula to count non-empty cells out of duplicates?
    By Royser12345 in forum Excel General
    Replies: 3
    Last Post: 09-14-2014, 03:09 AM
  4. [SOLVED] Formula to count duplicates in 1, 2, 3 order
    By kas05j in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-25-2014, 11:02 AM
  5. [SOLVED] Count Duplicates by date
    By Trending in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-30-2014, 07:53 AM
  6. [SOLVED] formula that can count number of orders booked on a Date ignoring duplicates
    By Frankmed in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-20-2013, 05:26 PM
  7. Using a Formula to Count Duplicates in two Columns
    By JungleJme in forum Excel General
    Replies: 2
    Last Post: 08-25-2010, 07:01 AM

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