+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Count Unique Values matching 3 criteria

  1. #1
    Registered User
    Join Date
    03-31-2011
    Location
    Santa Maria,CA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Count Unique Values matching 3 criteria

    I have a dynamic spreadsheet currently with 10,000+ rows and 23 columns, about 5,000 rows will add monthly. It is a commission report for 17 sales reps.
    I want to track how many different customers a rep did business with during a particular month.
    I am currently using a pivot table, but that requires me to manually input the values each month.
    I would prefer to put a formula into the destination cell, as the rest of my report is automated using VBA. ( I am new to VBA)
    I need to count the number of "unique records" (text) in column H, matching the criteria in 3 other columns (all text).
    Column 'B' matches the name of the rep,(John Smith), column 'J' the revenue type (rental), column 'W' the month (JAN) (all text, no blanks in any of the 4 columns).
    This is what I tried, but only get a value of 1, my pivot table shows 109
    Please Login or Register  to view this content.
    ( I get the same answer with an array formula or not)
    I also tried using COUNTIFS combined with CountUniqueValues (tied to a VBA function).
    CountUniqueValues works, but I couldn't figure out how to tie the COUNTIFS to it, so I was getting the total Unique Values at 1,129 (total customer base).

    Thank you in advance, I really appreciate any help

    Wayne M

    I would like to know how many different customer (H), Ray A.(B) did rental (J) business with in Feb (W). Answer should be 3
    Sample Data.xlsm
    Last edited by Wayne M; 04-04-2011 at 04:07 AM. Reason: make a change in workbook

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Count Unique Values matching 3 criteria

    post a sample workbook please showing result required, otherwise someone will have to do a lot of typing to replicate it!
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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