Count unique values based on multiple criteria

G

Guest

Hi,

I am trying to do something that should be simple but I can't figure this
out. I want to count the number of unique customers in a sheet if the month =
7, year = 2006, region=East and segment = Top.

Of course, all these criteria are columns with multiple values - segment
would have Top, middle, bottom, Region would have East, West, North, South
etc.

Thanks!
 
G

Guest

Hi,

One possibility as a workaround would be a helper column, e.g in G2 for
customer names starting in a2:

=IF(AND(B2=7,C2=2006,D2="East",E2="Top"),A2,"")

copied down the G column to the end of the data, e.g. G500.

Then a count of the unique customer names that are in the G column:

=SUMPRODUCT(--(G2:G500<>"")/COUNTIF(G2:G500,G2:G500&""))

Hth
Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top