+ Reply to Thread
Results 1 to 9 of 9

Counting Unique Values in a Named Range using COUNTIF

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Counting Unique Values in a Named Range using COUNTIF

    If a UDF is acceptable see attachment, cell C100;
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    4

    Re: Counting Unique Values in a Named Range using COUNTIF

    I think fotis1991 is right. I was trying to find a way to avoid putting everything in one column because my employer wanted everything visually segregated by month. But unless I start building pivot tables, I think this is the best way to do it. Added a column for "month" to sort.

    One remaining problem: using the first function

    =SUMPRODUCT((CLIENT_ID<>"")/COUNTIF(CLIENT_ID,CLIENT_ID&""))

    yields a #DIV/0 error when the range includes blank cells. I can't figure out why - shouldn't the ("CLIENT_ID<>"") part preclude blank cells from the function? I tried updating the function to

    =SUMPRODUCT((CLIENT_ID<>"")/COUNTIF(CLIENT_ID,IF(CLIENT_ID=0,0,CLIENT_ID)))

    but I'm still getting a zero error. Thoughts? Thanks guys!

  3. #3
    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 Values in a Named Range using COUNTIF

    Hi

    ..yields a #DIV/0 error when the range includes blank cells. I can't figure out why - shouldn't the ("CLIENT_ID<>"") part preclude blank cells from the function?
    Why you say this??Maybe am i missing something??
    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.

  4. #4
    Registered User
    Join Date
    02-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    4

    Re: Counting Unique Values in a Named Range using COUNTIF

    Strange. When I save it as an '.xls' file, the function breaks and I get a zero error. When I save it as an '.xslx' file, it works. Does .xls not support named ranges? Using Excel for Mac 2008.

    Doesn't matter, it's working now. Thanks everybody for the assist!

+ 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