+ Reply to Thread
Results 1 to 9 of 9

Count cells containing unique text in cell A if cell B equals i.e. 1

  1. #1
    Registered User
    Join Date
    03-11-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    12

    Question Count cells containing unique text in cell A if cell B equals i.e. 1

    Hi
    I have a spreadsheet like the table in the picture. I would like to count unique values in cell B if cell A equals a certain value.

    This is the unsorted data
    Skjermbilde.PNG

    This is how I want to display the data
    Skjermbilde2.PNG

    Can anyone help me with this?

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    Hi and welcome to the forum!

    Kindly upload an actual spreadsheet, not just a picture.

    Click on Go Advanced and scroll down until you see Manage Attachments.

    Obviously replace any confidential/sensitive information with dummy data if necessary.

    Regards
    Click * below if this answer helped

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

  3. #3
    Registered User
    Join Date
    03-11-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    Dummydata.xlsx

    Thank you. Like this?

  4. #4
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    Hi
    I used helper column for that. But I am sure here will be smarter answers that do not use helper columns. Here is my answer with related file
    Appreciate the help? CLICK *

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    Or, in E2 and copy across:

    =SMALL(IF(FREQUENCY($A$3:$A$15,$A$3:$A$15),$A$3:$A$15),COLUMNS($A:A))

    In E3 and copy across, array formula**:

    =SUM(IF(FREQUENCY(IF($A$3:$A$15=E2,MATCH($B$3:$B$15,$B$3:$B$15,0)),ROW($B$3:$B$15)-MIN(ROW($B$3:$B$15))+1),1))

    Regards

  6. #6
    Registered User
    Join Date
    03-11-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    12

    Smile Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    Thanks for Your help! This worked wonderfully!

  7. #7
    Registered User
    Join Date
    03-11-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    This worked fine With text, but it doesn't seem to work as well With numbers?
    =SUM(IF(FREQUENCY(IF($A$3:$A$15=E2,MATCH($B$3:$B$15,$B$3:$B$15,0)),ROW($B$3:$B$15)-MIN(ROW($B$3:$B$15))+1),1))

    Is there another formula that Works better With numbers?

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    Can you post an example of what you mean?

    Regards

  9. #9
    Registered User
    Join Date
    03-11-2014
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    12

    Re: Count cells containing unique text in cell A if cell B equals i.e. 1

    Sorry!
    My bad. The formula is correct. I just thought I had another set of data

+ 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] When one cell equals value of another cell, then third cell displays text of fourth cell?
    By spookymyo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2021, 02:12 PM
  2. return unique list if cell value equals a1
    By lamdl in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-08-2014, 04:33 PM
  3. Replies: 8
    Last Post: 03-30-2012, 07:52 PM
  4. If Cell equals text Copy Cells, B2,B3,B4
    By Djmask in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2005, 11:11 AM
  5. Genarating count of unique words in a cell or cells
    By Hari in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 01-28-2005, 03:06 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