Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Counting on two conditions, one with a range

I have a list of people, their location, and job code like so

starting in a1

dave atlanta 2350
bob new york 2450
jim atlanta 3420
gary chicago 2550
mike atlanta 2450
cindy atlanta 2650
mary atlanta 2125
mark atlanta 2250

I have a list of job codes I want to count by city in e1

2125
2250
2350
2450

And I have a list of cities in h1

Atlanta
Chicago
New York

I want a formula in h2, h3, h4 for each city that will count how many people
are in each city if their job code matches one of the codes in the list in
column e.

I cant count the employees in each city with =sum(if(a1:a10=h1,1,0)) entered
as an array. I can't figure out how to combine that with the job code list
though to see if their job code matches one in my list in column e.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting on two conditions, one with a range

See this screencap:

http://img407.imageshack.us/img407/5755/sumpwz2.jpg

Enter the formula in F2. Copy across to H2 then down.

Biff

"Ted Metro" wrote in message
...
I have a list of people, their location, and job code like so

starting in a1

dave atlanta 2350
bob new york 2450
jim atlanta 3420
gary chicago 2550
mike atlanta 2450
cindy atlanta 2650
mary atlanta 2125
mark atlanta 2250

I have a list of job codes I want to count by city in e1

2125
2250
2350
2450

And I have a list of cities in h1

Atlanta
Chicago
New York

I want a formula in h2, h3, h4 for each city that will count how many
people
are in each city if their job code matches one of the codes in the list in
column e.

I cant count the employees in each city with =sum(if(a1:a10=h1,1,0))
entered
as an array. I can't figure out how to combine that with the job code
list
though to see if their job code matches one in my list in column e.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting on two conditions, one with a range

One way ..

Source table assumed in A1:C8, E1:E4 holds the input job codes of interest.
In H1 down is the city input, say: Atlanta, Chicago, etc

Place in I1:
=SUMPRODUCT((ISNUMBER(MATCH($C$1:$C$8,$E$1:$E$4,0) )*($B$1:$B$8=H1)))
Copy I1 down. Col I returns the required results for the city in col H.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Ted Metro" wrote:
I have a list of people, their location, and job code like so

starting in a1

dave atlanta 2350
bob new york 2450
jim atlanta 3420
gary chicago 2550
mike atlanta 2450
cindy atlanta 2650
mary atlanta 2125
mark atlanta 2250

I have a list of job codes I want to count by city in e1

2125
2250
2350
2450

And I have a list of cities in h1

Atlanta
Chicago
New York

I want a formula in h2, h3, h4 for each city that will count how many people
are in each city if their job code matches one of the codes in the list in
column e.

I cant count the employees in each city with =sum(if(a1:a10=h1,1,0)) entered
as an array. I can't figure out how to combine that with the job code list
though to see if their job code matches one in my list in column e.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Counting on two conditions, one with a range

Thank you Max & Biff!!!!!

"Max" wrote:

One way ..

Source table assumed in A1:C8, E1:E4 holds the input job codes of interest.
In H1 down is the city input, say: Atlanta, Chicago, etc

Place in I1:
=SUMPRODUCT((ISNUMBER(MATCH($C$1:$C$8,$E$1:$E$4,0) )*($B$1:$B$8=H1)))
Copy I1 down. Col I returns the required results for the city in col H.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Ted Metro" wrote:
I have a list of people, their location, and job code like so

starting in a1

dave atlanta 2350
bob new york 2450
jim atlanta 3420
gary chicago 2550
mike atlanta 2450
cindy atlanta 2650
mary atlanta 2125
mark atlanta 2250

I have a list of job codes I want to count by city in e1

2125
2250
2350
2450

And I have a list of cities in h1

Atlanta
Chicago
New York

I want a formula in h2, h3, h4 for each city that will count how many people
are in each city if their job code matches one of the codes in the list in
column e.

I cant count the employees in each city with =sum(if(a1:a10=h1,1,0)) entered
as an array. I can't figure out how to combine that with the job code list
though to see if their job code matches one in my list in column e.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting on two conditions, one with a range

Welcome, Ted.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Ted Metro" wrote in message
...
Thank you Max & Biff !!!!!



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
HELP!!! Counting Selective Responses if 2 conditions are met? David G Broadbent Excel Worksheet Functions 3 September 12th 06 01:27 PM
Counting a Column when Three Conditions are true jimswinder Excel Worksheet Functions 7 July 24th 06 08:09 PM
Counting Text Strings With Conditions [email protected] Excel Discussion (Misc queries) 2 July 15th 06 08:05 PM
counting cells in a data range that meet 3 specific conditions bekah7 Excel Discussion (Misc queries) 3 October 1st 05 06:21 AM
counting based on 2 conditions Thrava Excel Discussion (Misc queries) 3 December 8th 04 10:19 PM


All times are GMT +1. The time now is 08:16 PM.

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"