Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Countif function for Even and Odd numbers

Hi,

Since your sample numbers are integers, and noting Harlan's correct
observations

You might simplify your calculations one small way, enter the following in A10
=SUMPRODUCT(--MOD(A1:A9,2)) for ODD's
And in A11
=COUNT(A1:A9)-A10 for EVEN's

Or substitue one of Harlan's formulas for the first one.


--
Thanks,
Shane Devenshire


"Jezzy" wrote:

Hi Hi,

I need help with a formula. I would like to count a column that consists of
even and odd numbers eg. 28, 31, 43, 50, 60. I like to count how many
numbers in that column is odd or even.

I have tried the following but it didn't work

=countif(a1:a10,"1","3","5")

Appreciate some help here.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Countif function for Even and Odd numbers

You might simplify your calculations one small way,
=SUMPRODUCT(--MOD(A1:A9,2)) for ODD's


You can also remove the double unary.

=SUMPRODUCT(MOD(A1:A9,2))

--
Biff
Microsoft Excel MVP


"ShaneDevenshire" wrote in
message ...
Hi,

Since your sample numbers are integers, and noting Harlan's correct
observations

You might simplify your calculations one small way, enter the following in
A10
=SUMPRODUCT(--MOD(A1:A9,2)) for ODD's
And in A11
=COUNT(A1:A9)-A10 for EVEN's

Or substitue one of Harlan's formulas for the first one.


--
Thanks,
Shane Devenshire


"Jezzy" wrote:

Hi Hi,

I need help with a formula. I would like to count a column that consists
of
even and odd numbers eg. 28, 31, 43, 50, 60. I like to count how many
numbers in that column is odd or even.

I have tried the following but it didn't work

=countif(a1:a10,"1","3","5")

Appreciate some help here.

Thanks



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
COUNTIF a cell value is between two numbers LAWNDALE Excel Worksheet Functions 3 August 15th 08 11:47 PM
countif colored numbers Mark Excel Worksheet Functions 2 May 22nd 08 09:12 AM
Embed a countif function in subtotal function? Stuck at work Excel Worksheet Functions 1 February 14th 06 03:19 AM
COUNTIF for range of numbers bimseun Excel Discussion (Misc queries) 3 January 24th 06 02:40 PM
Countif for numbers between x and y don Excel Worksheet Functions 4 May 5th 05 01:01 PM


All times are GMT +1. The time now is 08:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"