Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up 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:
  1. =COUNTIF(B3:B10,"=EVEN(B3:B10)")

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default 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
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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
what is syntax for if(between range of dates,"Q1","Q2")? TLB Excel Worksheet Functions 3 December 6th 05 05:19 PM


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