+ Reply to Thread
Results 1 to 10 of 10

Sum unique dates in a given range

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    chicago, il
    MS-Off Ver
    Excel 2010
    Posts
    6

    Sum unique dates in a given range

    Hey,

    I've been searching the web for way to long try to find an answer to my problem and just can't seem to get a formula to work. It seems to me that it should be straight forward but I just can't it to work. What I'm looking for is a formula that will only count unique days from a given date range that can be changed. My spreadsheet on sheet 3 will have a ton of date stamps from when work was done and will have the same day multiple times. And in sheet 2 I will have a date range present and want to get the sum of the number of days a stamp is present between the given date range. Basically just a count of days in column b on sheet 3 between the range in sheet 2 but only unique days not the same day over and over. In my attached file I would like the results to just return 2 (7/22 and 7/25 are the only stamps between the date selected) but instead I keep getting 5 (the number of times those days are present not the unique times).

    Hope this makes sense and look forward to any help. I've attached a copy of how the spreadsheet would look. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Sum unique dates in a given range

    I thought I had it, and I got the same result.
    Last edited by daffodil11; 07-25-2013 at 02:27 PM. Reason: deleted

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

    Re: Sum unique dates in a given range

    I used helpcolumns to get the result.

    See the attached file.

    2 solutions are added:

    with pivot table.

    with sumproduct (see the green cell).
    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.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Sum unique dates in a given range

    I used this formula in I2 and it did the trick:

    =SUM(IF(FREQUENCY(IF(Sheet3!B2:B12>=D2,IF(Sheet3!B2:B12<=G2,Sheet3!B2:B12)),IF(Sheet3!B2:B12>=D2,IF(Sheet3!B2:B12<=G2,Sheet3!B2:B12))),1))

    This formula is an array, entered with Control+Shift+Enter

    Attachment 252996
    Last edited by daffodil11; 07-25-2013 at 02:51 PM. Reason: misplaced ( )'s

  5. #5
    Registered User
    Join Date
    07-10-2013
    Location
    chicago, il
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Sum unique dates in a given range

    Quote Originally Posted by oeldere View Post
    I used helpcolumns to get the result.

    See the attached file.

    2 solutions are added:

    with pivot table.

    with sumproduct (see the green cell).
    Thanks I'm gonna give this a try!
    Quote Originally Posted by daffodil11 View Post
    I used this formula in I2 and it did the trick:

    =SUM(IF(FREQUENCY(IF(Sheet3!B2:B12>=D2,IF(Sheet3!B2:B12<=G2,Sheet3!B2:B12)),IF(Sheet3!B2:B12>=D2,IF(Sheet3!B2:B12<=G2,Sheet3!B2:B12))),1))

    This formula is an array, entered with Control+Shift+Enter

    Attachment 252996
    Awesome, thank you too. We'll see if I can make either of these work!

  6. #6
    Registered User
    Join Date
    07-10-2013
    Location
    chicago, il
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Sum unique dates in a given range

    OK, I got this to work... sorta! My dates in column B are there from formulas and not a hand typed date. The formulas to count them aren't recognizing them. If I hand type in the date it works but with my auto import of the date. How do I fix that? Thanks again!

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

    Re: Sum unique dates in a given range

    It seems your data (after download) are stored as text.

    f2 =b2*1

    and drag down

    Then copy past special them back to column B.

    After that you can delete column F.

  8. #8
    Registered User
    Join Date
    07-10-2013
    Location
    chicago, il
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Sum unique dates in a given range

    Thanks, that worked!!! Think I got this figured out... well think you guys got it figured out and I copy and pasted it!

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

    Re: Sum unique dates in a given range

    @bbennett281

    Thanks for the reply.

    Glad I could help.

    Please Login or Register  to view this content.
    That's a good way of learning it.

  10. #10
    Registered User
    Join Date
    07-10-2013
    Location
    Malaga
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Sum unique dates in a given range

    Thank you so much, great information!!!!!

    -------------------------------
    http://onlinepersonaltrainer.es

+ 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. Counting number of unique dates per month in a list of duplicate dates
    By Rackle83 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-22-2013, 10:15 AM
  2. Replies: 1
    Last Post: 12-18-2012, 03:09 PM
  3. [SOLVED] COUNT unique reference numbers based dates in a specified date range
    By 3PDM in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-14-2012, 08:50 AM
  4. # of unique dates per unique list entry
    By MrNovice in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-27-2009, 07:01 AM
  5. Trouble getting Unique Dates from Range
    By Mark in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-02-2005, 08:05 PM

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