Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Counting Individuals NOT Occurrences with than one criteria

I have a Excel 2007 Spreadsheet with 26 columns and 190 rows arranged as
follows:

A B C D E
F
1 Harm Red Fully Ach Abstinence Partly Ach Harm Red Fully Ach
2 Harm Red Fully Ach Harm Red Fully Ach
3 Harm Red Partly Ach
4 Abstinence Not Ach Harm Red Partly Ach
5 Abstinence Partly Ach
6 Harm Red Fully Ach Harm Red Partly Ach
7 Harm Red Fully Ach

Now I've been trying to use SUMPRODUCT and it only gives occurrences of say
'Harm Red' and 'Fully Ach'.

I need to be able to count individuals with at least one 'Harm Red' with a
'Fully Ach'. So in the example above there are 4 individuals (out of 7) with
at least one 'Harm Red' and 'Fully Ach' type of pairing even though there are
6 occurrences of this type of pairing.

I definitely need to be able to know how to arrive at the answer 4 through
Excel Worksheet Functions.

Could anybody help please!!

Thanking you in advance

All the best

Roy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Counting Individuals NOT Occurrences with than one criteria

Hi,
try

=SUMPRODUCT((A1:A7="Harm Red")*(B1:B7="Fully Ach"))

"Royegg" wrote:

I have a Excel 2007 Spreadsheet with 26 columns and 190 rows arranged as
follows:

A B C D E
F
1 Harm Red Fully Ach Abstinence Partly Ach Harm Red Fully Ach
2 Harm Red Fully Ach Harm Red Fully Ach
3 Harm Red Partly Ach
4 Abstinence Not Ach Harm Red Partly Ach
5 Abstinence Partly Ach
6 Harm Red Fully Ach Harm Red Partly Ach
7 Harm Red Fully Ach

Now I've been trying to use SUMPRODUCT and it only gives occurrences of say
'Harm Red' and 'Fully Ach'.

I need to be able to count individuals with at least one 'Harm Red' with a
'Fully Ach'. So in the example above there are 4 individuals (out of 7) with
at least one 'Harm Red' and 'Fully Ach' type of pairing even though there are
6 occurrences of this type of pairing.

I definitely need to be able to know how to arrive at the answer 4 through
Excel Worksheet Functions.

Could anybody help please!!

Thanking you in advance

All the best

Roy

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Counting Individuals NOT Occurrences with than one criteria

Hi Eduardo,

Thanks for your reply.

I've tried SUMPRODUCT type formalas like this before but it comes up with
occurrences rather than the number of individuals. I did try your version
and added several other 'pairings' but unfortunately it only seemed throw up
occurrences.

All the best

Roy

"Eduardo" wrote:

Hi,
try

=SUMPRODUCT((A1:A7="Harm Red")*(B1:B7="Fully Ach"))

"Royegg" wrote:

I have a Excel 2007 Spreadsheet with 26 columns and 190 rows arranged as
follows:

A B C D E
F
1 Harm Red Fully Ach Abstinence Partly Ach Harm Red Fully Ach
2 Harm Red Fully Ach Harm Red Fully Ach
3 Harm Red Partly Ach
4 Abstinence Not Ach Harm Red Partly Ach
5 Abstinence Partly Ach
6 Harm Red Fully Ach Harm Red Partly Ach
7 Harm Red Fully Ach

Now I've been trying to use SUMPRODUCT and it only gives occurrences of say
'Harm Red' and 'Fully Ach'.

I need to be able to count individuals with at least one 'Harm Red' with a
'Fully Ach'. So in the example above there are 4 individuals (out of 7) with
at least one 'Harm Red' and 'Fully Ach' type of pairing even though there are
6 occurrences of this type of pairing.

I definitely need to be able to know how to arrive at the answer 4 through
Excel Worksheet Functions.

Could anybody help please!!

Thanking you in advance

All the best

Roy

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,510
Default Counting Individuals NOT Occurrences with than one criteria

Hi Roy,

I would create some additional columns; One for each of the criteria Harm
Red Fully Ach etc and use the names as column headers. In your example they
would be columns G to K with the column headers
Harm Red, Fully Ach, Partly Ach, Not Ach, Abstinence

In cell G2 insert =COUNTIF($A2:$F2,G$1)
Note absolute ($signs) on the columns for $A2:$F2 and absolute on the row
for G$1.
Copy the formula across to column K and down for the length of your data.

Now to count the Harm Red and Fully Ach across the row.
In Cell L2 insert =COUNTIFS(G2,"0",H2,"0")

Copy this formula down for the length of your data.
Sum column L for the total answer.

You can add additional columns like L for counts of other combinations.

--
Regards,

OssieMac


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Counting Individuals NOT Occurrences with than one criteria

Hi there.
Did you even give a try to my suggestion in your original post? If not,
please, see the link below:

http://www.microsoft.com/office/comm...503&sloc=en-us

Regards,
Otávio

"Royegg" wrote:

I have a Excel 2007 Spreadsheet with 26 columns and 190 rows arranged as
follows:

A B C D E
F
1 Harm Red Fully Ach Abstinence Partly Ach Harm Red Fully Ach
2 Harm Red Fully Ach Harm Red Fully Ach
3 Harm Red Partly Ach
4 Abstinence Not Ach Harm Red Partly Ach
5 Abstinence Partly Ach
6 Harm Red Fully Ach Harm Red Partly Ach
7 Harm Red Fully Ach

Now I've been trying to use SUMPRODUCT and it only gives occurrences of say
'Harm Red' and 'Fully Ach'.

I need to be able to count individuals with at least one 'Harm Red' with a
'Fully Ach'. So in the example above there are 4 individuals (out of 7) with
at least one 'Harm Red' and 'Fully Ach' type of pairing even though there are
6 occurrences of this type of pairing.

I definitely need to be able to know how to arrive at the answer 4 through
Excel Worksheet Functions.

Could anybody help please!!

Thanking you in advance

All the best

Roy



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Counting Individuals NOT Occurrences with than one criteria

Hi OssieMac,

Thank you for your help with this problem - it definitely works a treat!!

I should have thought to create new variables like you would in SPSS but the
beauty of Excel is that it all becomes automatically updated with the overlay
of new raw data - something which SPSS does not do as you always seem to have
re-run variables.

Thanks once again

All the best

Roy

"OssieMac" wrote:

Hi Roy,

I would create some additional columns; One for each of the criteria Harm
Red Fully Ach etc and use the names as column headers. In your example they
would be columns G to K with the column headers
Harm Red, Fully Ach, Partly Ach, Not Ach, Abstinence

In cell G2 insert =COUNTIF($A2:$F2,G$1)
Note absolute ($signs) on the columns for $A2:$F2 and absolute on the row
for G$1.
Copy the formula across to column K and down for the length of your data.

Now to count the Harm Red and Fully Ach across the row.
In Cell L2 insert =COUNTIFS(G2,"0",H2,"0")

Copy this formula down for the length of your data.
Sum column L for the total answer.

You can add additional columns like L for counts of other combinations.

--
Regards,

OssieMac


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 Individuals not Occurrences in Excel 2007 Royegg Excel Worksheet Functions 2 December 8th 09 02:52 PM
Counting occurrences with 2 seperate criteria Dant Excel Worksheet Functions 1 April 6th 09 03:33 PM
counting occurrences dpwicz Excel Discussion (Misc queries) 2 October 2nd 08 06:25 PM
Counting occurrences GARY Excel Discussion (Misc queries) 3 August 13th 08 10:06 PM
counting occurrences in another sheet based on several criteria WiFiMike2006 Excel Worksheet Functions 16 January 15th 07 11:24 PM


All times are GMT +1. The time now is 05:53 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"