+ Reply to Thread
Results 1 to 5 of 5

find unique values in a range that contains text and empty cells

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    3

    find unique values in a range that contains text and empty cells

    Hi,

    I am trying to count the number of unique values in column B, given a certain criteria in column C. Both ranges are text. Column B may have empty values.

    I have tried the following formula but cannot find a way to add an IF for the criteria (column C):

    =SUM(IF(FREQUENCY(IF(LEN(B2:B100)>0,MATCH(B2:B100,B2:B100,0),""),IF(LEN(B2:B100)>0,MATCH(B2:B100,B2:B100,0),""))>0,1))

    Have also tried the below formula, but doesn't work with empty cells in Column B:

    =SUM(IF(FREQUENCY(IF(C1:C100="A",MATCH(B1:B100,B1:B100,0)),ROW(B1:B100)-ROW(B1)+1),1)).

    Help please?

    Thanks!!

    Nic
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,604

    Re: find unique values in a range that contains text and empty cells

    Add &C2:C10000 to your formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-03-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: find unique values in a range that contains text and empty cells

    hi thanks for the prompt, however, I only need to count the number of unique values in B, if for example, value in C = A....

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,604

    Re: find unique values in a range that contains text and empty cells

    Maybe this (In D1 enter letter you searching for i.e. A):

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Migt be slow so keep ranges to minimum (i.e. 100 instead of 10000)

  5. #5
    Registered User
    Join Date
    07-03-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: find unique values in a range that contains text and empty cells

    yeap that works a treat thanks very much!

+ 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