+ Reply to Thread
Results 1 to 4 of 4

Count only unique dates in an entire range even if some cells in range are blank

  1. #1
    Forum Contributor
    Join Date
    05-12-2021
    Location
    USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    259

    Count only unique dates in an entire range even if some cells in range are blank

    So I'm looking to make a tool for my supervisor to use when he needs to count amount of days worked for an employee. I am currently using the following formulas in the existing sheet I gave him before:

    In cell S8:
    =INT(D8) The dates they work are in column D.
    For this particular employee, their dates extend all the way down to S80.

    In cell S81:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The reason why we have the formula counting unique dates is because there is a possibility the same date will appear twice due to them receiving different pay rates from differentials or premiums. This formula works nice, but the problem is every employee is different in the amount of days they have worked, so we constantly have to change the range end. I moved the =SUMPRODUCT(1/COUNTIF(S8:S80,S8:S80)) formula that was in S81 to column T in hopes that we could just use the entire S column in the range instead of a specified number so that it would look like =SUMPRODUCT(1/COUNTIF(S:S,S:S)). Naturally it gave a #div/0 error. So I am wondering if there might be an alternative that we can use or how the formula might be adjusted so that going forward, he can just paste any new employee's data over the previous employee he had already done.

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,972

    Re: Count only unique dates in an entire range even if some cells in range are blank

    Try S81 cell formula

    HTML Code: 

  3. #3
    Forum Contributor
    Join Date
    05-12-2021
    Location
    USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    259

    Re: Count only unique dates in an entire range even if some cells in range are blank

    Quote Originally Posted by wk9128 View Post
    Try S81 cell formula

    HTML Code: 
    Cool thanks for that. I put the formula in column T and was able to even just have it as:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So now it will only count unique dates and won't count blank cells. Thanks for the help!

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,972

    Re: Count only unique dates in an entire range even if some cells in range are blank

    You're Welcome. Thank You 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)

Similar Threads

  1. Count Unique Cells in a range / Count duplicate cells in a range
    By SmTkr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-27-2021, 03:25 AM
  2. [SOLVED] Count unique names in range of dates
    By Gregoiredlg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2019, 11:07 AM
  3. [SOLVED] Delete entire row if cells within that range are blank
    By RIZVI in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2019, 12:40 PM
  4. Replies: 2
    Last Post: 02-13-2017, 06:37 PM
  5. Count Unique Values within range when other column is not blank
    By samn827 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2015, 09:50 AM
  6. [SOLVED] Why filtered Cells Error to sum or Count if the entire range is blank?
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2014, 03:55 AM
  7. [SOLVED] Macro to hide entire columns within range if cells within range are blank
    By graphicgoose in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2013, 08:26 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