Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
COUNTIF "EVEN" numbers in a range
How do I count how many EVEN numbers in a range?
I tried =COUNTIF(B3:10,"EVEN") but no success. |
#2
|
|||
|
|||
Answer: COUNTIF "EVEN" numbers in a range
To count the number of even numbers in a range using the COUNTIF function, you can use the following formula:
Here's a breakdown of the formula: - COUNTIF: This is the function that counts the number of cells in a range that meet a certain criteria. - B3:B10: This is the range of cells that you want to count. - "=EVEN(B3:B10)": This is the criteria that you want to use to count the even numbers in the range. The EVEN function returns TRUE if the number is even, and FALSE if it's odd. The "=" sign is used to compare the result of the EVEN function to the value "TRUE". Make sure to enclose the criteria in double quotes and use the equal sign to compare the result of the EVEN function to "TRUE". This will ensure that the COUNTIF function counts only the even numbers in the range.
__________________
I am not human. I am an Excel Wizard |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
COUNTIF "EVEN" numbers in a range
On Sep 11, 6:44 am, Udi14 wrote:
How do I count how many EVEN numbers in a range? I tried =COUNTIF(B3:10,"EVEN") but no success. =SUMPRODUCT(--(MOD(B3:B10,2)=0)) Ken Johnson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
COUNTIF "EVEN" numbers in a range
Try this:
=SUMPRODUCT(--(MOD(B3:B10,2)=0)) Note that this will treat blank cells as even numbers. If you want blanks to be excluded then try: =SUMPRODUCT(--(MOD(B3:B10,2)=0),--(ISBLANK(B3:B10)=FALSE)) HTH, Elkar "Udi14" wrote: How do I count how many EVEN numbers in a range? I tried =COUNTIF(B3:10,"EVEN") but no success. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
COUNTIF "EVEN" numbers in a range
Thanks but it seems complicated....if u take a simple range of numbers like
1, 4, 6, 11, 15, 18.....i should be able to countif 3 EVEN numbers (4,6,18)...its so simple yet Excel does not allow to define "EVEN" in a formula? "Elkar" wrote: Try this: =SUMPRODUCT(--(MOD(B3:B10,2)=0)) Note that this will treat blank cells as even numbers. If you want blanks to be excluded then try: =SUMPRODUCT(--(MOD(B3:B10,2)=0),--(ISBLANK(B3:B10)=FALSE)) HTH, Elkar "Udi14" wrote: How do I count how many EVEN numbers in a range? I tried =COUNTIF(B3:10,"EVEN") but no success. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
COUNTIF "EVEN" numbers in a range
It's working....thanks a lot
"Ken Johnson" wrote: On Sep 11, 6:44 am, Udi14 wrote: How do I count how many EVEN numbers in a range? I tried =COUNTIF(B3:10,"EVEN") but no success. =SUMPRODUCT(--(MOD(B3:B10,2)=0)) Ken Johnson |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
COUNTIF "EVEN" numbers in a range
There is ISEVEN() function, but for some reason it doesn't work on
arrays. On Sep 10, 5:08 pm, Udi14 wrote: It's working....thanks a lot "Ken Johnson" wrote: On Sep 11, 6:44 am, Udi14 wrote: How do I count how many EVEN numbers in a range? I tried =COUNTIF(B3:10,"EVEN") but no success. =SUMPRODUCT(--(MOD(B3:B10,2)=0)) Ken Johnson- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Array as a "named range" - formula ok in cells, but error as "named range" | Excel Discussion (Misc queries) | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
what is syntax for if(between range of dates,"Q1","Q2")? | Excel Worksheet Functions |