Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using COUNTIF and OR
I know COUNTIF isn't the right function because I know it cannot use logic
operators. Here's what I am trying to accomplish: Col A Col B A 5 B 6 C 3 A 3 A B 7 The question is, how many numbers in Column B correspond to EITHER A or C? Recommendations? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using COUNTIF and OR
See if this works for you:
=SUMPRODUCT((A1:A6="A")+(A1:A6="C"),--(ISNUMBER(B1:B6))) HTH Elkar "Janie" wrote: I know COUNTIF isn't the right function because I know it cannot use logic operators. Here's what I am trying to accomplish: Col A Col B A 5 B 6 C 3 A 3 A B 7 The question is, how many numbers in Column B correspond to EITHER A or C? Recommendations? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using COUNTIF and OR
I depends on what you mean by "correspond to". Regardless, an "or" condition
involves simple addition. Try: To count the occurrences: =countif(a:a,"A")+countif(a:a,"C") To sum column B if: =sumif(a:a,"A",b:b)+sumif(a:a,"C",b:b) Regards, Fred. "Janie" wrote in message ... I know COUNTIF isn't the right function because I know it cannot use logic operators. Here's what I am trying to accomplish: Col A Col B A 5 B 6 C 3 A 3 A B 7 The question is, how many numbers in Column B correspond to EITHER A or C? Recommendations? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using COUNTIF and OR
try this after changing columns to suit
=SUMPRODUCT((H2:H22={"a","b"})*(I2:I220)) -- Don Guillett Microsoft MVP Excel SalesAid Software "Janie" wrote in message ... I know COUNTIF isn't the right function because I know it cannot use logic operators. Here's what I am trying to accomplish: Col A Col B A 5 B 6 C 3 A 3 A B 7 The question is, how many numbers in Column B correspond to EITHER A or C? Recommendations? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using COUNTIF and OR
=SUM(SUMIF(A1:A10,{"A","B"},B1:B9))
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Janie" wrote in message ... I know COUNTIF isn't the right function because I know it cannot use logic operators. Here's what I am trying to accomplish: Col A Col B A 5 B 6 C 3 A 3 A B 7 The question is, how many numbers in Column B correspond to EITHER A or C? Recommendations? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Countif Use | Excel Worksheet Functions | |||
How do I use a countif function according to two other countif fu. | Excel Worksheet Functions | |||
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") | Excel Discussion (Misc queries) | |||
COUNTIF or not to COUNTIF on a range in another sheet | Excel Worksheet Functions | |||
COUNTIF in one colum then COUNTIF in another...??? | Excel Worksheet Functions |