Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Anyway to put logic into a single countif, sumif etc?
Is there anyway to countif for multiple things?
like = countif(Range, "1" or "2") I know you can do "<1" dor does not equal but can you do combos within a countif or do you have to run multiple countifs Thanks -- BlueWolverine MSE - Mech. Eng. Go BLUE! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Anyway to put logic into a single countif, sumif etc?
Hi there Blue,
Yes, there is. You can either use two COUNTIF() functions... =COUNTIF(A2:A10,"=1")+COUNTIF(A2:A10,"=2") Or you can use a slight workaround for using only one function... =SUMPRODUCT((A2:A10=1)+(A2:A10=2)) Change the range(s) to suit. Note if you are using the SUMPRODUCT() function the ranges must be exactly the same in dimensions. The COUNTIF() should work faster though. HTH -- Zack Barresse "BlueWolverine" wrote in message ... Is there anyway to countif for multiple things? like = countif(Range, "1" or "2") I know you can do "<1" dor does not equal but can you do combos within a countif or do you have to run multiple countifs Thanks -- BlueWolverine MSE - Mech. Eng. Go BLUE! |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Anyway to put logic into a single countif, sumif etc?
Try this:
=SUM(COUNTIF(Range,{"1","2"})) "BlueWolverine" wrote: Is there anyway to countif for multiple things? like = countif(Range, "1" or "2") I know you can do "<1" dor does not equal but can you do combos within a countif or do you have to run multiple countifs Thanks -- BlueWolverine MSE - Mech. Eng. Go BLUE! |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Anyway to put logic into a single countif, sumif etc?
Thank you! I Particularly like the sum(countif({})) method!
-- BlueWolverine MSE - Mech. Eng. Go BLUE! "Teethless mama" wrote: Try this: =SUM(COUNTIF(Range,{"1","2"})) "BlueWolverine" wrote: Is there anyway to countif for multiple things? like = countif(Range, "1" or "2") I know you can do "<1" dor does not equal but can you do combos within a countif or do you have to run multiple countifs Thanks -- BlueWolverine MSE - Mech. Eng. Go BLUE! |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Anyway to put logic into a single countif, sumif etc?
Is there a way to do the same thing with a cell?
=SUM(COUNTIF(023:Q23, 024 or P24) I've tried and it returns a "0". Thanks, Terry On Apr 28, 1:12*pm, BlueWolverine wrote: Thank you! I Particularly like thesum(countif({})) method! -- BlueWolverine MSE - Mech. Eng. Go BLUE! "Teethless mama" wrote: Try this: =SUM(COUNTIF(Range,{"1","2"})) "BlueWolverine" wrote: Is there anyway tocountiffor multiple things? * like =countif(Range, "1" or "2") I know you can do "<1" dor does not equal but can you do combos within a countifor do you have to run multiple countifs Thanks -- BlueWolverine MSE - Mech. Eng. Go BLUE!- Hide quoted text - - Show quoted text - |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Anyway to put logic into a single countif, sumif etc?
=COUNTIF(O23:Q23,O24)+COUNTIF(O23:Q23,P24)
-- Zack Barresse "Tmaxx02" wrote in message ... Is there a way to do the same thing with a cell? =SUM(COUNTIF(023:Q23, 024 or P24) I've tried and it returns a "0". Thanks, Terry On Apr 28, 1:12 pm, BlueWolverine wrote: Thank you! I Particularly like thesum(countif({})) method! -- BlueWolverine MSE - Mech. Eng. Go BLUE! "Teethless mama" wrote: Try this: =SUM(COUNTIF(Range,{"1","2"})) "BlueWolverine" wrote: Is there anyway tocountiffor multiple things? like =countif(Range, "1" or "2") I know you can do "<1" dor does not equal but can you do combos within a countifor do you have to run multiple countifs Thanks -- BlueWolverine MSE - Mech. Eng. Go BLUE!- Hide quoted text - - Show quoted text - |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Anyway to put logic into a single countif, sumif etc?
Or..
=COUNT(IF((O23:Q23=O24)+(O23:Q23=P24),O23:Q23)) Confirmed with Ctrl + Shfit + Enter -- Zack Barresse "Tmaxx02" wrote in message ... Is there a way to do the same thing with a cell? =SUM(COUNTIF(023:Q23, 024 or P24) I've tried and it returns a "0". Thanks, Terry On Apr 28, 1:12 pm, BlueWolverine wrote: Thank you! I Particularly like thesum(countif({})) method! -- BlueWolverine MSE - Mech. Eng. Go BLUE! "Teethless mama" wrote: Try this: =SUM(COUNTIF(Range,{"1","2"})) "BlueWolverine" wrote: Is there anyway tocountiffor multiple things? like =countif(Range, "1" or "2") I know you can do "<1" dor does not equal but can you do combos within a countifor do you have to run multiple countifs Thanks -- BlueWolverine MSE - Mech. Eng. Go BLUE!- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
COUNTIF with AND logic | Excel Worksheet Functions | |||
Countif Using Multiple Logic Tests | Excel Worksheet Functions | |||
Using 'AND' logic in a SUMIF statement | Excel Worksheet Functions | |||
COUNTIF with Logic? | Excel Worksheet Functions | |||
Countif with AND logic | Excel Worksheet Functions |