Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting Individuals not Occurrences in Excel 2007 | Excel Worksheet Functions | |||
Counting occurrences with 2 seperate criteria | Excel Worksheet Functions | |||
counting occurrences | Excel Discussion (Misc queries) | |||
Counting occurrences | Excel Discussion (Misc queries) | |||
counting occurrences in another sheet based on several criteria | Excel Worksheet Functions |