+ Reply to Thread
Results 1 to 4 of 4

Need a formula to count unique names in a column based on criteria from another column.

  1. #1
    Registered User
    Join Date
    09-06-2018
    Location
    Dublin, Ireland
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Need a formula to count unique names in a column based on criteria from another column.

    Hi all,

    I have a table where I need to count only values of 0 in column B and from those remaining cells remove the duplicates in column A (which is made up of numbers and letters).

    As an example of what it basically looks like;

    CUSTOMER | INVOICE AMOUNT
    Smith0123 | 0
    Cooper0123 | 123
    White0123 | 165
    Cooper0123 | 0
    Osbourne0123 | 651
    Smith0123 | 0
    Osbourne0123 | 0
    Smith0123 | 9
    White0123 | 58169



    So I would need the formula to tell me that of the 5 values of 0 in the Invoice Amounts column there are 3 unique accounts in the Customer column (Smith0123, Cooper0123 and Osbourne0123).

    I am aware I can filter down to just show 0's and then remove duplicates and count the remaining, but I also need to do a count of unique accounts with a value and this is part of a bigger macro so needs to be a formula.

    Many thanks

    DC

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Need a formula to count unique names in a column based on criteria from another column

    Enter array formula in C2 and copy down

    **Must be entered with Ctrl+Shift+Enter key combination.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C
    1 CUSTOMER INVOICE AMOUNT
    2 Smith0123 0 Smith0123
    3 Cooper0123 123 Cooper0123
    4 White0123 165 Osbourne0123
    5 Cooper0123 0
    6 Osbourne0123 651
    7 Smith0123 0
    8 Osbourne0123 0
    9 Smith0123 9
    10 White0123 58169

    If you need to count unique records with criteria in Column B =0 use this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This will give you the result of 3
    Last edited by AlKey; 09-06-2018 at 12:04 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    09-06-2018
    Location
    Dublin, Ireland
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Re: Need a formula to count unique names in a column based on criteria from another column

    Hi Alkey,

    The second formula was exactly what I needed, however, when I now try to get a count of the unique customers with an invoice amount greater than 0 it is throwing up a #DIV/0! error.

    Any advice on how to do this formula?

    Many thanks

    DC

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Need a formula to count unique names in a column based on criteria from another column

    Quote Originally Posted by DC1986 View Post
    Hi Alkey,

    The second formula was exactly what I needed, however, when I now try to get a count of the unique customers with an invoice amount greater than 0 it is throwing up a #DIV/0! error.

    Any advice on how to do this formula?

    Many thanks

    DC
    I should be a similar formula with criteria >=0
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. Replies: 3
    Last Post: 08-24-2017, 05:59 AM
  2. Replies: 20
    Last Post: 08-24-2017, 02:40 AM
  3. [SOLVED] count unique records in one column based on criteria in a different column
    By rxg2669 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2015, 12:38 AM
  4. Replies: 2
    Last Post: 11-21-2014, 12:59 PM
  5. [SOLVED] Count unique entries based off unique criteria in another column
    By hambly in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-11-2014, 03:33 PM
  6. Count unique occurrances based off criteria in a different column
    By Enovy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-05-2013, 03:28 PM
  7. Replies: 5
    Last Post: 09-18-2011, 10:44 PM

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