Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default COUNT occurances if criteria is met

I have been up and down trying to find a answer but no luck.

I have a spreadsheet that contains all the employees for the company. One
column lists the branch where the employee sits, and another lists the market
group they belong to. I need a formula that counts how many locations are in
that market group.

Any ideas?

Using Excel 2003.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default COUNT occurances if criteria is met

So if the market for instance would be East and there would be 10 entries
for that market of which
6 are unique you want to return 6?

=SUMPRODUCT(--(A2:A400<""),--(A2:A400="East")/COUNTIF(B2:B400,B2:B400&""))

If you want to count it as 10 use


=COUNTIF(A2:A400,"East")


--


Regards,


Peo Sjoblom






"John" wrote in message
...
I have been up and down trying to find a answer but no luck.

I have a spreadsheet that contains all the employees for the company. One
column lists the branch where the employee sits, and another lists the
market
group they belong to. I need a formula that counts how many locations are
in
that market group.

Any ideas?

Using Excel 2003.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default COUNT occurances if criteria is met

Peo...You are correct in what I am looking to return, but the formula does
not return the correct number. I get an answer that is not a whole#. Any
ideas?

"Peo Sjoblom" wrote:

So if the market for instance would be East and there would be 10 entries
for that market of which
6 are unique you want to return 6?

=SUMPRODUCT(--(A2:A400<""),--(A2:A400="East")/COUNTIF(B2:B400,B2:B400&""))

If you want to count it as 10 use


=COUNTIF(A2:A400,"East")


--


Regards,


Peo Sjoblom






"John" wrote in message
...
I have been up and down trying to find a answer but no luck.

I have a spreadsheet that contains all the employees for the company. One
column lists the branch where the employee sits, and another lists the
market
group they belong to. I need a formula that counts how many locations are
in
that market group.

Any ideas?

Using Excel 2003.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default COUNT occurances if criteria is met

Try this

=SUMPRODUCT(--(A2:A400<""),--(A2:A400="East"),--(B2:B400<"")/COUNTIF(B2:B400,B2:B400&""))



--


Regards,


Peo Sjoblom


"John" wrote in message
...
Peo...You are correct in what I am looking to return, but the formula does
not return the correct number. I get an answer that is not a whole#. Any
ideas?

"Peo Sjoblom" wrote:

So if the market for instance would be East and there would be 10 entries
for that market of which
6 are unique you want to return 6?

=SUMPRODUCT(--(A2:A400<""),--(A2:A400="East")/COUNTIF(B2:B400,B2:B400&""))

If you want to count it as 10 use


=COUNTIF(A2:A400,"East")


--


Regards,


Peo Sjoblom






"John" wrote in message
...
I have been up and down trying to find a answer but no luck.

I have a spreadsheet that contains all the employees for the company.
One
column lists the branch where the employee sits, and another lists the
market
group they belong to. I need a formula that counts how many locations
are
in
that market group.

Any ideas?

Using Excel 2003.






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default COUNT occurances if criteria is met

Hi,

Assuming your data is in range A1:B6 as follows:

Branch Group
Delhi Marketing
Mumbai Finance
Calcutta Operations
Mumbai Marketing
Mumbai Operations

Enter the Marketing in cell A8 and enter the following array formula
(confirmed by Ctrl+Shift+Enter) in cell B8.

=ROUNDUP(SUM(IF(($B$1:$B$6=$A8),1/COUNTIF($A$1:$A$6,A1:A6),0)),0).

Hope this helps.


--
Regards,

Ashish Mathur
www.ashishmathur.com
http://www.linkedin.com/in/excelenthusiasts

"John" wrote in message
...
I have been up and down trying to find a answer but no luck.

I have a spreadsheet that contains all the employees for the company. One
column lists the branch where the employee sits, and another lists the
market
group they belong to. I need a formula that counts how many locations are
in
that market group.

Any ideas?

Using Excel 2003.

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
Count occurances Gaurav[_2_] Excel Worksheet Functions 1 April 26th 08 01:11 AM
Count of different occurances Bee Excel Discussion (Misc queries) 3 October 8th 07 03:36 AM
Count Occurances of a txt string flumpuk Excel Discussion (Misc queries) 1 September 1st 07 01:04 PM
count occurances kevcar40 Excel Discussion (Misc queries) 3 June 13th 07 10:00 PM
count occurances in a row using multiple criteria clarknv Excel Worksheet Functions 3 May 19th 07 07:16 PM


All times are GMT +1. The time now is 06:02 AM.

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

About Us

"It's about Microsoft Excel"