+ Reply to Thread
Results 1 to 5 of 5

Formula to count unique possible?

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Formula to count unique possible?

    Hi,

    I have data like this:

    ID8899 - Apple - 5.99$
    ID8899 - Apple - 5.99$
    ID7788 - Banana - 4.99$
    ID8899 - Apple - 5.99$
    ID8899 - Apple - 5.99$
    ID7788 - Banana - 4.99$
    ID8899 - Apple - 5.99$

    I want to be able to add a column D and using a formula to only add the number 1 to the first one that is unique.

    ID8899 - Apple - 5.99$ - 1
    ID8899 - Apple - 5.99$ - 0
    ID7788 - Banana - 4.99$ - 1
    ID8899 - Apple - 5.99$ - 0
    ID8899 - Apple - 5.99$ - 0
    ID7788 - Banana - 4.99$ - 0
    ID8899 - Apple - 5.99$ - 0

    I can use pivot table to only list unique data result, but the problem with pivot table is that we cannot add comment. So I am looking a way to generate the same result as Pivot Table, but being able to add a column to add "Comment".

    Any solution?

    Thanks

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to count unique possible?

    One way...

    Data Range
    A
    B
    C
    D
    1
    ------
    2
    ID8899
    Apple
    5.99$
    1
    3
    ID8899
    Apple
    5.99$
    0
    4
    ID7788
    Banana
    4.99$
    1
    5
    ID8899
    Apple
    5.99$
    0
    6
    ID8899
    Apple
    5.99$
    0
    7
    ID7788
    Banana
    4.99$
    0
    8
    ID8899
    Apple
    5.99$
    0


    This formula entered in D2 and copied down:

    =--(COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: Formula to count unique possible?

    Thanks, if I just copy paste the formula it works. But my data is stored in a table and has header.
    How the formula works?
    Please Login or Register  to view this content.
    But it doesn't work.

  4. #4
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Formula to count unique possible?

    You can use this formula on column D to achieve this.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to count unique possible?

    Can you post a SMALL sample file and show us what result you expect?

    A SMALL file will have about 20 rows worth 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. (Count Formula) Count if two seperate ranges create unique combination
    By Geekcrux in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2016, 07:00 AM
  2. [SOLVED] Unique Count formula
    By pauldaddyadams in forum Excel General
    Replies: 2
    Last Post: 04-08-2015, 06:45 AM
  3. count unique (frequency formula)
    By jw01 in forum Excel General
    Replies: 1
    Last Post: 01-12-2015, 10:00 PM
  4. Replies: 0
    Last Post: 03-22-2012, 08:44 PM
  5. Count Unique Dates If formula
    By areynolds in forum Excel General
    Replies: 4
    Last Post: 11-16-2011, 11:22 AM
  6. [SOLVED] Double/unique Count Formula
    By stewart08 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-09-2008, 02:52 PM
  7. Count Unique Formula ?
    By koda86 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-30-2006, 11:10 AM

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