+ Reply to Thread
Results 1 to 5 of 5

Count multiple criteria including date range and unique contact names

  1. #1
    Registered User
    Join Date
    12-15-2021
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    3

    Count multiple criteria including date range and unique contact names

    Hello Excel Wizards! I’m hoping someone can help me as I’m going out of my mind.

    I’m creating a stats sheet to record contact types made throughout the year, broken down into a monthly view. I’m currently trying to establish a formula to tell me the number of phone calls made in a month to a unique person (I.e. if they’ve had multiple calls in July, then they’re only counted once)



    Cell references:-

    Contact date: July!A:A

    Contact name: July!B:B

    Contact type: July!D:D



    At present, my formula counts unique contacts within the stipulated dates for July, I just can’t work out how I add that I also need it to consider the contact type made.



    Formula I’ve currently got:

    =SUMPRODUCT(IF((July!$A$2:$A$2499<=DATE(2022,7,31))*( July!$A$2:$A$2499>=DATE(2022,7,1)), 1/COUNTIFS(July!$A$2:$A$2499,"<="&DATE(2022,7,31), July!$A$2:$A$2499, ">="&DATE(2022,7,1), July!$B$2:$B$2499,July!$B$2:$B$2499), 0))


    As much as I would love to use a pivot table for this, it's not an option.

    Any help where to add the stipulation of contact type to this would be greatly appreciated!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count multiple criteria including date range and unique contact names

    Have you considered the COUNTIFS() function which largely replaced the popular SUMPRODUCT option when XL 2007 was introduced.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Count multiple criteria including date range and unique contact names

    If you're on O365 then you should be able to leverage the UNIQUE/FILTER/LET functions. Something like:

    Please Login or Register  to view this content.
    That will return the list of unique names/types. Or you could use:

    Please Login or Register  to view this content.
    To return the count

    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Count multiple criteria including date range and unique contact names

    How about:

    =LET(dates,July!A:A,names,July!B:B,types,July!D:D,IFERROR(ROWS(UNIQUE(FILTER(names,(dates>=DATE(2022,7,1))*(dates<=DATE(2022,7,31))*(types=1)))),0))

    I used a generic type of 1, in red above, which you will need to change to suit.

    If you will always want a whole month then you could shorten it to:

    =LET(dates,July!A:A,names,July!B:B,types,July!D:D,IFERROR(ROWS(UNIQUE(FILTER(names,(MONTH(dates)=7)*(types=1)))),0))

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Count multiple criteria including date range and unique contact names

    You could use the Group By function of Power Query to count the number of times for the specific criteria. If you are interested in learning this, then post a sample of your data but do not post a picture.

    Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. [SOLVED] Formula needed to count unique values with multiple criteria within a specific date range
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-29-2021, 10:49 AM
  2. Count unique value from a date range with multiple criteria by vba
    By rachelwahid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2020, 05:56 AM
  3. Count unique value from a date range with multiple criteria
    By rachelwahid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2020, 07:28 AM
  4. [SOLVED] List unique names with multiple criteria including 2 dates
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-17-2020, 03:50 PM
  5. [SOLVED] Count and sum with multiple criteria including date range
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-23-2016, 04:46 PM
  6. Adding a date range to a unique data count based on multiple criteria
    By Matthew_Smith86 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-10-2015, 08:50 AM
  7. Replies: 6
    Last Post: 04-20-2015, 07:22 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