Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mike
 
Posts: n/a
Default Counting Unique text entries in a sheet with a condition

I have a list of names with mutiple entries for most of them
I need to count the unique names but that only meet another criteria

eg
A B
Uk Mike
DE Fred
Uk Mike
Ch Ted
Uk Rose

What I need is a formulae that will let me specify if colulm A is UK count
the unique names in colum B - the answer should be 2 (Mike & Rose are in UK)

Thanks
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Mike,

Try this

=SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

--
HTH

Bob Phillips

"Mike" wrote in message
...
I have a list of names with mutiple entries for most of them
I need to count the unique names but that only meet another criteria

eg
A B
Uk Mike
DE Fred
Uk Mike
Ch Ted
Uk Rose

What I need is a formulae that will let me specify if colulm A is UK count
the unique names in colum B - the answer should be 2 (Mike & Rose are in

UK)

Thanks



  #3   Report Post  
Mike
 
Posts: n/a
Default

Bob
Thank you so much - your a top man - did the trick I was messing with
FREQUENCY & MATCH functions which were driving me crazy.

Can I add more than one Criteria eg UK and maybe another coloum criteria?

Thanks
Mike

"Bob Phillips" wrote:

Hi Mike,

Try this

=SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

--
HTH

Bob Phillips

"Mike" wrote in message
...
I have a list of names with mutiple entries for most of them
I need to count the unique names but that only meet another criteria

eg
A B
Uk Mike
DE Fred
Uk Mike
Ch Ted
Uk Rose

What I need is a formulae that will let me specify if colulm A is UK count
the unique names in colum B - the answer should be 2 (Mike & Rose are in

UK)

Thanks




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

It can be done with Frequency and Match

=COUNT(1/FREQUENCY(IF((A1:A100="UK")*(B1:B100<""),MATCH(B1 :B100,B1:B100,0))
,ROW(INDEX(B1:B100,0,0))-ROW(B1)+1))

which as an array formula is committed with Ctrl-Shift-Enter, but the
SUMPRODUCT is easier.

For more conditions, you just add it to the first part, like so

=SUMPRODUCT((A1:A100="UK")*(C1:C100="other
value")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

Regards

Bob

"Mike" wrote in message
...
Bob
Thank you so much - your a top man - did the trick I was messing with
FREQUENCY & MATCH functions which were driving me crazy.

Can I add more than one Criteria eg UK and maybe another coloum criteria?

Thanks
Mike

"Bob Phillips" wrote:

Hi Mike,

Try this

=SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

--
HTH

Bob Phillips

"Mike" wrote in message
...
I have a list of names with mutiple entries for most of them
I need to count the unique names but that only meet another criteria

eg
A B
Uk Mike
DE Fred
Uk Mike
Ch Ted
Uk Rose

What I need is a formulae that will let me specify if colulm A is UK

count
the unique names in colum B - the answer should be 2 (Mike & Rose are

in
UK)

Thanks






  #5   Report Post  
Mike
 
Posts: n/a
Default

Thank you Bob Very helpful
Mike

"Bob Phillips" wrote:

It can be done with Frequency and Match

=COUNT(1/FREQUENCY(IF((A1:A100="UK")*(B1:B100<""),MATCH(B1 :B100,B1:B100,0))
,ROW(INDEX(B1:B100,0,0))-ROW(B1)+1))

which as an array formula is committed with Ctrl-Shift-Enter, but the
SUMPRODUCT is easier.

For more conditions, you just add it to the first part, like so

=SUMPRODUCT((A1:A100="UK")*(C1:C100="other
value")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

Regards

Bob

"Mike" wrote in message
...
Bob
Thank you so much - your a top man - did the trick I was messing with
FREQUENCY & MATCH functions which were driving me crazy.

Can I add more than one Criteria eg UK and maybe another coloum criteria?

Thanks
Mike

"Bob Phillips" wrote:

Hi Mike,

Try this

=SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

--
HTH

Bob Phillips

"Mike" wrote in message
...
I have a list of names with mutiple entries for most of them
I need to count the unique names but that only meet another criteria

eg
A B
Uk Mike
DE Fred
Uk Mike
Ch Ted
Uk Rose

What I need is a formulae that will let me specify if colulm A is UK

count
the unique names in colum B - the answer should be 2 (Mike & Rose are

in
UK)

Thanks








  #6   Report Post  
Mike
 
Posts: n/a
Default

Bob
Can I ask your help again pls
I now need to just count the numner of unique text enteries in a coloulm of
data
I have trie dto figur eit out but I must me being dumb?
can you advise pls

Mike

"Bob Phillips" wrote:

It can be done with Frequency and Match

=COUNT(1/FREQUENCY(IF((A1:A100="UK")*(B1:B100<""),MATCH(B1 :B100,B1:B100,0))
,ROW(INDEX(B1:B100,0,0))-ROW(B1)+1))

which as an array formula is committed with Ctrl-Shift-Enter, but the
SUMPRODUCT is easier.

For more conditions, you just add it to the first part, like so

=SUMPRODUCT((A1:A100="UK")*(C1:C100="other
value")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

Regards

Bob

"Mike" wrote in message
...
Bob
Thank you so much - your a top man - did the trick I was messing with
FREQUENCY & MATCH functions which were driving me crazy.

Can I add more than one Criteria eg UK and maybe another coloum criteria?

Thanks
Mike

"Bob Phillips" wrote:

Hi Mike,

Try this

=SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<""))

--
HTH

Bob Phillips

"Mike" wrote in message
...
I have a list of names with mutiple entries for most of them
I need to count the unique names but that only meet another criteria

eg
A B
Uk Mike
DE Fred
Uk Mike
Ch Ted
Uk Rose

What I need is a formulae that will let me specify if colulm A is UK

count
the unique names in colum B - the answer should be 2 (Mike & Rose are

in
UK)

Thanks






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting Unique Cells When Spread Sheet is Filtered carl Excel Worksheet Functions 1 June 3rd 05 07:20 PM
counting unique instances of text in a list WadeSansing Excel Worksheet Functions 5 June 1st 05 06:57 PM
Clicking cells on sheet creates Text Box. How do I turn this off? Ken Excel Discussion (Misc queries) 3 April 27th 05 11:53 PM
Counting Repeated text or duplicates in a list Repeatdude Excel Discussion (Misc queries) 5 November 26th 04 07:10 PM
Counting Numbers with Text scottymelloty Excel Worksheet Functions 6 November 22nd 04 08:31 PM


All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"