+ Reply to Thread
Results 1 to 10 of 10

Counting unique clients during a specific period of time with other criteria

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    Cumberland, MD
    MS-Off Ver
    Excel 2010
    Posts
    4

    Counting unique clients during a specific period of time with other criteria

    I am trying to count the number of unique clients who received services from my agency during a specific period of time and further describe them by other criteria such as codes. I like "countifs" and am not an Excel guru.

    In my spread sheet:

    On the tab marked "DATA":

    Column A has a code
    Column B contains my client names
    Column C is the date of service

    On the tab marked "FY Summary" I want to see a count of unique customers by code who received services in a particular fiscal year.

    My results would tell me that I had "2 CUW" clients in FY 1 or "10 CDBG" clients in FY 3 etc...

    Ideally, I would like to be able to add other criteria based on other columns

    I am hoping it will look something like this:

    =countifs(B:B,"MAGIC UNIQUE TEXT VALUE FUNCTION",A:A,"CODE",C:C,">=07/01/09",e:e,"<=06/30/10")

    Sadly, I don't think it will.

    Thanks!!!
    Attached Files Attached Files

  2. #2
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: Counting unique clients during a specific period of time with other criteria

    What are the start date and end date for FY1,FY2,FY3,FY4 and F5?

  3. #3
    Registered User
    Join Date
    08-29-2012
    Location
    Cumberland, MD
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Counting unique clients during a specific period of time with other criteria

    Fiscal Years start on 7/1 and end on 6/30. If I can use countifs, I can easily specify the criteria for FY's like this: ">=07/01/09",e:e,"<=06/30/10". Which is Fiscal Year 2010. It's the counting the unique names that I can't figure out. Thanks!

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting unique clients during a specific period of time with other criteria

    One way could be this.

    Pls, check it.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Counting unique clients during a specific period of time with other criteria

    it ain't countifs but I reckon this works-I added a column to the source data to calculate fiscal year but you could do it in the summary formula
    Attached Files Attached Files
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Registered User
    Join Date
    08-29-2012
    Location
    Cumberland, MD
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Counting unique clients during a specific period of time with other criteria

    Thank you both for helping! One question, will these work with blanks cells?

    Not a big problem if they don't. I had hoped to set it up to look at the entire column so that when I paste in new data, it would be ready to go.

    I am checking both now, again thanks!

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Counting unique clients during a specific period of time with other criteria

    I would not recommend using entire column references in this sort of formula as it's calculation-intensive. you would be better off using named ranges or a table.

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting unique clients during a specific period of time with other criteria

    Quote Originally Posted by JosephP View Post
    I would not recommend using entire column references in this sort of formula as it's calculation-intensive. you would be better off using named ranges or a table.

    Agree on this.

  9. #9
    Registered User
    Join Date
    08-29-2012
    Location
    Cumberland, MD
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Counting unique clients during a specific period of time with other criteria

    Fotis,

    I have a question about this part of "(Data!$D$2:$D$132=1)" of this formula: =SUMPRODUCT((Data!$A$2:Data!$A$132="CUW")*(Data!$D$2:$D$132=1)*(Data!$C$2:$C$132>=L2)*(Data!$C$2:$C$132<=L3))

    It appears to only count the folks who have a "1" in the helper column beside their name. I need to count unique occurrences of a name in a range, I want to know the number of individuals who received services in a fiscal year. I have been counting it manually and my first try at using your formula returned inaccurate results.

    Thanks

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting unique clients during a specific period of time with other criteria

    My formula returns number 5 as result.

    It's count 5 because in this Fiscal Year--">=07/01/09",e:e,"<=06/30/10"--- there are 5 clients with code CUW.

    iN rOWS, 21,22,23,24,32.

    Isn't this correct? If not which is the correct result for this period?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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