+ Reply to Thread
Results 1 to 10 of 10

Unique count of number of weeks worked per month

  1. #1
    Registered User
    Join Date
    04-29-2014
    Location
    Los Angeles
    MS-Off Ver
    MS365 v2210
    Posts
    21

    Unique count of number of weeks worked per month

    Salutations Gurus

    I need to total the number of shows per month that employees worked on during a 12-month period.
    Attached is the excel file with the job table in question.

    The screenshot below shows the following highlighted dimensions of that table:
    • Red, for name of the show;
    • Blue, for the number of weeks worked in a month by the person in Job 1 and person in Job 2;
    • Yellow, is the result I am trying to total.

    The result should only count the number of shows that people worked on. Blank cells should not be counted. Notice, month 12 had no working shows.
    Using standard COUNTA() or COUNTIF() will count each populated row of a show twice due to the two jobs that duplicate the rows for each show. This said, I need to count those duplicate rows in any given month as once, if populated; and uniquely as being part of 1 working show; and I can't seem to find the formula to do this correctly.

    Thank you

    Al
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by alwizardus; 11-06-2022 at 12:47 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Unique count of number of weeks worked per month

    Administrative Note:

    Is your forum profile showing the version of Excel that you need this to work for?

    Members will tailor the solutions they offer to the version of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent versions of Excel are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the release number in your profile (e.g. MS365 Version 2211). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Unique count of number of weeks worked per month

    If you have upgraded to MS365 or Excel 2021, you can use this copied across:

    =COUNTA(UNIQUE(FILTER($C$7:$C$14,D7:D14<>"","")))

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Unique count of number of weeks worked per month

    In Excel 2016 (provided you have always 2 jobs per show) this in D16 and copied to the right shall do the task:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  5. #5
    Registered User
    Join Date
    04-29-2014
    Location
    Los Angeles
    MS-Off Ver
    MS365 v2210
    Posts
    21

    Re: Unique count of number of weeks worked per month

    Dear AliGW

    Thank you for your input, I just changed the MS version on my profile to indicate: MS365 v2210 - Thank you!

    I left one critical piece of data and I did not upload the correct excel file - my apologies.
    For the empty rows, I actually have "0" instead of blanks.

    I like your formula and I modified the assigned value to the "<>" operator in the Filter() to 0 as opposed to "", and for the most part it did work, but for rows that only have "0", it still counted as 1 as opposed to 0.

    This is the modification I made to your formula:

    =COUNTA(UNIQUE(FILTER($C$7:$C$14,O7:O14<>0,"")))

    Attached is the excel file with this change, if you are able to find the correct formula, I am indebted to your kindness

    Thanks again

    Al
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by alwizardus; 11-06-2022 at 01:26 PM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Unique count of number of weeks worked per month

    Try this:

    =LET(f,UNIQUE(FILTER($C$7:$C$14,D7:D14<>0,"")),UNIQUE(IF(f="",0,COUNTA(f))))

    You have calculations set to manual - change that to automatic.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  7. #7
    Registered User
    Join Date
    04-29-2014
    Location
    Los Angeles
    MS-Off Ver
    MS365 v2210
    Posts
    21

    Re: Unique count of number of weeks worked per month

    Thank you for the revision AliGW, works great. Kindly, let me know if the reputation rating came through? I am relatively new to ExcelForum. Al

  8. #8
    Registered User
    Join Date
    04-29-2014
    Location
    Los Angeles
    MS-Off Ver
    MS365 v2210
    Posts
    21

    Re: Unique count of number of weeks worked per month

    Thank you Kaper, your formula also worked. Much appreciated for your kindness. Al

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Unique count of number of weeks worked per month

    Thanks for the rep - very kind.

  10. #10
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Unique count of number of weeks worked per month

    Also thanks for the reputation added. Glad it worked for you.

+ 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 52 weeks back IF worker has worked
    By Sparda in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 11-05-2023, 04:17 PM
  2. Excel formula to count number of unique active users each month
    By JohanBvD in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2022, 10:10 AM
  3. [SOLVED] Count the weeks in a month
    By 45687354154896 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-07-2020, 10:10 PM
  4. How many weeks worked over X-number of hours
    By EvanHailey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2017, 08:19 PM
  5. Replies: 3
    Last Post: 06-01-2014, 02:09 AM
  6. Count number of unique cells if month =
    By BM02GAN in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2014, 12:31 PM
  7. Count Mondays worked in Month
    By harnagel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2005, 11:12 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