+ Reply to Thread
Results 1 to 5 of 5

Need a count of unique values in col. with multiple values in a cell.

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    Indy
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need a count of unique values in col. with multiple values in a cell.

    I have a column of codes. The codes have a prefix, hyphen, followed by a number. There can be multiple codes, single codes or no codes in a cell. I need a formula that counts how many unique codes are the column. Example column below:

    Codes
    INA-721, INA-521, INB-222
    INB-222

    ING-111
    IND-721
    INA-123, INA-234, ING-111
    IND-721

    IND-21
    INA-721, INA-123
    INA-721
    INA-999

    I need a formula that produces a count of unique codes per prefix in place of the the numbers below:
    Ind. Codes [B}# of Unique Codes[/B]
    INA codes = 5
    INB codes = 1
    IND codes = 2
    ING codes = 1

    I have tried counting the code prefixes but that doesn't provide me the unique total.
    I have tried counting the unique cells on this column but this considers the cells with mulitple values as unique, not looking at the individual values within the cells.

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Need a count of unique values in col. with multiple values in a cell.

    Hi Drew,

    Here's my attempt... nothing elegant... let me know what you think...
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Need a count of unique values in col. with multiple values in a cell.

    send the real worksheet attachment to understand your meant.

  4. #4
    Registered User
    Join Date
    05-21-2013
    Location
    Indy
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Need a count of unique values in col. with multiple values in a cell.

    Quote Originally Posted by djapigo View Post
    Hi Drew,

    Here's my attempt... nothing elegant... let me know what you think...
    Thanks for looking into this conundrum. You are 2/3's there. You isolated by the prefix then counted the number of cells with each prefix in the column. I am looking to isolate by prefix then count how many unique numbers there are within each prefix.

    So the answers should be:
    INA codes = 5 not 8
    INB codes = 1 not 2
    IND codes = 2 not 3
    ING codes = 1 not 2

  5. #5
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Need a count of unique values in col. with multiple values in a cell.

    How many codes can be in one cell? Your example has at most 3... my formulas will check up to 4... but the formulas are getting uglier...

    Let me know what you think... I'm sure someone else can create something more elegant... sorry, let me know if this works for you...
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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