+ Reply to Thread
Results 1 to 5 of 5

Formula to count only one duplicate value

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    9

    Formula to count only one duplicate value

    Hi all,
    I have found various solutions to this problem (such as removing duplicate values, but this is not quite what I want).

    I have a list of invoice numbers in left column, and in the right column I only want to count the value once.

    Like this:

    Invoice ID Unique orders
    Invoice 1 0
    Invoice 1 0
    Invoice 1 1
    Invoice 2 1
    Invoice 3 0
    Invoice 3 1
    Total 3


    I had a formula that looked something like this before

    =SUM(IF(FREQUENCY([@[Invoice real]],[@[Invoice real]])>0,1))
    =IF(COUNTIF(K65:$K$9028,K65)=1,1,0)


    However since I am using a table with dynamic range this formula seems to break every time I sort in a different way.

    I am a bit stuck here, so any help would be much appreciated.

    Thanks

  2. #2
    Registered User
    Join Date
    04-18-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Formula to count only one duplicate value

    To clarify,
    I need something like this:

    order example.jpg

  3. #3
    Registered User
    Join Date
    03-12-2013
    Location
    Viet Nam
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Formula to count only one duplicate value

    If your data set A1:B9 you can use formula:
    Unique Invoice
    Please Login or Register  to view this content.
    Sum
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-18-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Formula to count only one duplicate value

    Thanks for quick reply!
    So my data is in a table, and I link it to a pivot table, so I use "structured references".
    So the formula would look something like this (if Transaction number = unique invoice), however this is not working, I am not sure if it is possible to do what I am asking for with structured references?


    =IF(ROW([@[Transaction number]])=LOOKUP(2,1/([@[Transaction number]]=[@[Transaction number]]),ROW([@[Transaction number]])),1,0)

    Any ideas?

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

    Re: Formula to count only one duplicate value

    another alternative solution
    b2 cell =IF(COUNTIF($A$2:A2,A2)=COUNTIF(A:A,A2),1,0) then drag down
    Appreciate the help? CLICK *

+ 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