Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Formula - Count the number of unique values a vlookup would return

Status
Not open for further replies.

DanAuber

IS-IT--Management
Apr 28, 2000
255
FR
Hi there,

I'm struggling to write an excel formula to do what I want to do. I have a list of Countries and each is supposed to have a unique rating in the list. I want to put a formula in to check this. In a perfect world the formula would come back with the number of unique records for the country (and then I could investigate all those over 1). However if this is too tricky, I'd be happy if it just returned "Non-Unique"). I've attached a small data sample along with the two possible columns I'm trying to generate in yellow.

Thanks for any help on this


 
 http://files.engineering.com/getfile.aspx?folder=d20ac3a1-103e-482e-a62d-170c1af52f3d&file=tt_example.xlsx
Hi,

A simple solution that indicates either you have one rating or you don't, seems sufficient.

I made your table a Structured Table named tCntryRtg. This expression compares the occurrence count of Country & Rating with the occurrence count of Country alone...
[tt]
=SUMPRODUCT(--([Country]=[@Country])*([Rating]=[@Rating]))=SUMPRODUCT(--([Country]))
[/tt]

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top