Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Counting based on multiple criteria

I'm trying to find a way to count the number of records that match a certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals, Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals "Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"), or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Counting based on multiple criteria

Try

=SUMPRODUCT(--($J$9:$J$318="Advanced Process Control"),
--ISNUMBER(SEARCH("Chemicals",$G$9:$G$318)))

Hope this helps,

Hutch

"Kathleen_TX" wrote:

I'm trying to find a way to count the number of records that match a certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals, Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals "Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"), or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Counting based on multiple criteria

Beautiful, that works! Thanks a bunch!

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--($J$9:$J$318="Advanced Process Control"),
--ISNUMBER(SEARCH("Chemicals",$G$9:$G$318)))

Hope this helps,

Hutch

"Kathleen_TX" wrote:

I'm trying to find a way to count the number of records that match a certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals, Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals "Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"), or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Counting based on multiple criteria

Sorry, but I just realized that the function didn't exactly work as expected.
The first part of the function is only returning the number of records that
exactly match the criteria (e.g., if a cell only contains "Advanced Process
Control" and nothing else). It's not picking up records that contain the
criteria in addition to other text strings. For example, some cells contain
Advanced Process Control in addition to other text strings (e.g. cell J86
contains "Exploration & Production Operations, Process Engineering, Advanced
Process Control, Production Management & Execution"). I need the function to
count this cell since it contains "Advanced Process Control". Is there a way
to do this?

Many thanks in advance for your help.

Best regards,
Kathleen


"Kathleen_TX" wrote:

Beautiful, that works! Thanks a bunch!

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--($J$9:$J$318="Advanced Process Control"),
--ISNUMBER(SEARCH("Chemicals",$G$9:$G$318)))

Hope this helps,

Hutch

"Kathleen_TX" wrote:

I'm trying to find a way to count the number of records that match a certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals, Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals "Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"), or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Counting based on multiple criteria

I guess I misunderstood what you wanted. If you want to count all the cells
that have "Chemicals" anywhere in them in column G AND have "Advanced Process
Control" anywhere in them in column J, try this version:

=SUMPRODUCT(--(ISNUMBER(SEARCH("Advanced Process Control",$J$9:$J$318))),
--ISNUMBER(SEARCH("Chemicals",$G$9:$G$318)))

Hope this helps,

Hutch

"Kathleen_TX" wrote:

Sorry, but I just realized that the function didn't exactly work as expected.
The first part of the function is only returning the number of records that
exactly match the criteria (e.g., if a cell only contains "Advanced Process
Control" and nothing else). It's not picking up records that contain the
criteria in addition to other text strings. For example, some cells contain
Advanced Process Control in addition to other text strings (e.g. cell J86
contains "Exploration & Production Operations, Process Engineering, Advanced
Process Control, Production Management & Execution"). I need the function to
count this cell since it contains "Advanced Process Control". Is there a way
to do this?

Many thanks in advance for your help.

Best regards,
Kathleen


"Kathleen_TX" wrote:

Beautiful, that works! Thanks a bunch!

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--($J$9:$J$318="Advanced Process Control"),
--ISNUMBER(SEARCH("Chemicals",$G$9:$G$318)))

Hope this helps,

Hutch

"Kathleen_TX" wrote:

I'm trying to find a way to count the number of records that match a certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals, Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals "Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"), or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Counting based on multiple criteria

Thanks Tom. It works beautifully. You're amazing.

Best regards,
Kathleen

"Tom Hutchins" wrote:

I guess I misunderstood what you wanted. If you want to count all the cells
that have "Chemicals" anywhere in them in column G AND have "Advanced Process
Control" anywhere in them in column J, try this version:

=SUMPRODUCT(--(ISNUMBER(SEARCH("Advanced Process Control",$J$9:$J$318))),
--ISNUMBER(SEARCH("Chemicals",$G$9:$G$318)))

Hope this helps,

Hutch

"Kathleen_TX" wrote:

Sorry, but I just realized that the function didn't exactly work as expected.
The first part of the function is only returning the number of records that
exactly match the criteria (e.g., if a cell only contains "Advanced Process
Control" and nothing else). It's not picking up records that contain the
criteria in addition to other text strings. For example, some cells contain
Advanced Process Control in addition to other text strings (e.g. cell J86
contains "Exploration & Production Operations, Process Engineering, Advanced
Process Control, Production Management & Execution"). I need the function to
count this cell since it contains "Advanced Process Control". Is there a way
to do this?

Many thanks in advance for your help.

Best regards,
Kathleen


"Kathleen_TX" wrote:

Beautiful, that works! Thanks a bunch!

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--($J$9:$J$318="Advanced Process Control"),
--ISNUMBER(SEARCH("Chemicals",$G$9:$G$318)))

Hope this helps,

Hutch

"Kathleen_TX" wrote:

I'm trying to find a way to count the number of records that match a certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals, Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals "Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"), or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting based on multiple criteria

I want to count the number of records that contain
"Advanced Process Control" in Column J if Column
G contains "Chemicals".


Would Specialty Chemicals be counted as Chemicals?

--
Biff
Microsoft Excel MVP


"Kathleen_TX" wrote in message
...
I'm trying to find a way to count the number of records that match a
certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals,
Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals
"Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"),
or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Counting based on multiple criteria

Yes, I realized that later. But I worked around it by doing a Find and
Replace to replace all occurrences of Specialty Chemicals with Spec.

Tom Hutchins suggestion worked like a charm. Thanks!

"T. Valko" wrote:

I want to count the number of records that contain
"Advanced Process Control" in Column J if Column
G contains "Chemicals".


Would Specialty Chemicals be counted as Chemicals?

--
Biff
Microsoft Excel MVP


"Kathleen_TX" wrote in message
...
I'm trying to find a way to count the number of records that match a
certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing multiple
market segments (Chemicals, Polymers, Specialty Chemicals,
Pharmaceuticals,
etc). Column J contains application names, again with each cell containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying to
find a formula that will work. For example, I want to count the number of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals
"Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process Control"),
or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen



.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting based on multiple criteria

Ok, thanks for feeding back.

--
Biff
Microsoft Excel MVP


"Kathleen_TX" wrote in message
...
Yes, I realized that later. But I worked around it by doing a Find and
Replace to replace all occurrences of Specialty Chemicals with Spec.

Tom Hutchins suggestion worked like a charm. Thanks!

"T. Valko" wrote:

I want to count the number of records that contain
"Advanced Process Control" in Column J if Column
G contains "Chemicals".


Would Specialty Chemicals be counted as Chemicals?

--
Biff
Microsoft Excel MVP


"Kathleen_TX" wrote in message
...
I'm trying to find a way to count the number of records that match a
certain
criteria. Here's exactly what I'm working with:

Column G contains market segment data, with each cell containing
multiple
market segments (Chemicals, Polymers, Specialty Chemicals,
Pharmaceuticals,
etc). Column J contains application names, again with each cell
containing
multiple applications (Advanced Process Control, Planning & Scheduling,
Engineering, etc).

Since I can't do a pivot table with the data setup this way, I'm trying
to
find a formula that will work. For example, I want to count the number
of
records that contain "Advanced Process Control" in Column J if Column G
contains "Chemicals". I tried the following formula:

=SUMPRODUCT(($G$9:$G$318="Chemicals")*($J$9:$J$318 ="Advanced Process
Control"))

But that only counts if a cell with the range in column G equals
"Chemicals"
(doesn't contain anything else), not if it contains "Chemicals".

Is there a way to do an IF THEN formula, meaning that IF range G8:G318
contains "Chemicals", THEN COUNTIF (J8:J318 "Advanced Process
Control"),
or
is there another way to do this?

Your help will be greatly appreciated.

Best regards,
Kathleen



.



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 and Suming based on multiple criteria Kev270 Excel Worksheet Functions 1 October 12th 06 02:55 PM
Counting based on multiple criteria cubsfan Excel Discussion (Misc queries) 1 April 21st 06 03:58 PM
Counting based on multiple criteria cubsfan Excel Discussion (Misc queries) 2 April 20th 06 11:30 PM
Help w/ counting multiple columns based on IF criteria ConstructionGuy Excel Worksheet Functions 3 November 8th 05 04:03 AM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM


All times are GMT +1. The time now is 08:30 AM.

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"