+ Reply to Thread
Results 1 to 6 of 6

counting unique values in one column for each value in another

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    counting unique values in one column for each value in another

    I have a spreadsheet with many rows. I am quite familiar with pivot tables and perhaps I am just missing something, but I am unable to do what I want within a pivot.

    Let's say in column A and B I have the following values

    yellow chocolate
    yellow chocolate
    blue chocolate
    yellow vanilla
    yellow vanilla
    blue vanilla
    black strawberrry
    red vanilla

    I would like to report on how many unique flavors of ice cream there are by color. The resulting table would show:

    yellow 2
    blue 2
    black 1
    red 1

    So rather than defineing a range and creating a pivot that would show the total count of flavors by color, I simply want a count of the unique flavors by color.

    Thanks

  2. #2
    Registered User
    Join Date
    08-15-2012
    Location
    Ontario
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: counting unique values in one column for each value in another

    Try and see if this works: http://stackoverflow.com/questions/1...-unique-values

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: counting unique values in one column for each value in another

    Hi seancain99

    Perhaps something like the attached file.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: counting unique values in one column for each value in another

    With helpcolumn and pivot table.

    See attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    04-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: counting unique values in one column for each value in another

    Quote Originally Posted by jplank View Post
    Thanks very much. I hadn't thought of that, but it is a creative solution. It would be nice to have that option to count unique built into pivots.

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: counting unique values in one column for each value in another

    It does, Excel 2013!

    Quote Originally Posted by seancain99 View Post
    Thanks very much. I hadn't thought of that, but it is a creative solution. It would be nice to have that option to count unique built into pivots.

+ 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