+ Reply to Thread
Results 1 to 5 of 5

Count of unique contractors that were paid during the month

Hybrid View

  1. #1
    Registered User
    Join Date
    07-12-2005
    Location
    Canberra, Australia
    MS-Off Ver
    2007
    Posts
    43

    Count of unique contractors that were paid during the month

    Hi - I would like to count the number of contractors that we paid during the month.

    The problem I have is that a contractor can be listed several times depending on the type of service – e.g. standard hours, oncall, call-back etc.

    I want to only count the contractor once if the sum of their payments is greater than zero and I want to do it with a formula rather than a pivot table.

    Columns A to D in the attached file contains the source data. I have created a pivot table only to illustrate that I want to identify the number of contractors that the pivot table displays. Cell H20 shows the result is 16. I would like to enter a formula in cell H21 which references the source data.

    I have done many searches but can’t find the solution to my specific scenario.

    Can anyone help please?

    Many thanks
    David

  2. #2
    Forum Contributor
    Join Date
    07-29-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    255

    Re: Count of unique contractors that were paid during the month

    Here's my go at it. Not one formula but a nice summary..
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.

  3. #3
    Registered User
    Join Date
    07-12-2005
    Location
    Canberra, Australia
    MS-Off Ver
    2007
    Posts
    43

    Re: Count of unique contractors that were paid during the month

    Thanks a lot Pickslides. I appreciate your suggestion. Because of the way I have set up the file, I particularly want a single formula that I can copy across from month to month. I know you can do it with an array formula but I can't for the life of me work out how to do it.
    Thanks
    David

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Count of unique contractors that were paid during the month

    Is it counting unique distintc list with criteria in other column?

    Try with one formula only:

    =SUM(IFERROR(1/IF(SUMIF(A2:A67,A2:A67,D2:D67)>0,COUNTIF(A2:A67,A2:A67),0),0))
    Or

    =SUM(IFERROR(1/((SUMIF(A2:A67,A2:A67,D2:D67)>0)*COUNTIF(A2:A67,A2:A67)),0))
    ...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.
    Quang PT

  5. #5
    Registered User
    Join Date
    07-12-2005
    Location
    Canberra, Australia
    MS-Off Ver
    2007
    Posts
    43

    Re: Count of unique contractors that were paid during the month

    Wow that is exactly what I am after. That's excellent. Thanks for doing this. That's a big help.

    Regards,
    David

+ 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. Replies: 3
    Last Post: 06-01-2014, 02:09 AM
  2. Count number of unique cells if month =
    By BM02GAN in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2014, 12:31 PM
  3. [SOLVED] Formula to Count Unique Customer by Month
    By byankton in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-19-2013, 12:39 AM
  4. Count unique for specific month
    By Bob@Sun in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2011, 02:52 PM
  5. Count unique days within month
    By jirib in forum Excel General
    Replies: 7
    Last Post: 08-26-2010, 06:12 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