How do I count odd numbers in a range?

G

Guest

Could someone please help me!!!

I am trying to count how many odd and even numbers there in a range. I have
tried to use the 'countif' , 'iseven' and 'isodd' formulas. However, I have
been unsuccessful.

Can someone please let me know if this can be done?
 
G

Guest

Here's a formula from an older post by Peo Sjoblom that seems to do what you
want:
=SUMPRODUCT(--(MOD(A1:A22,2)=1))
Adjust the range as necessary.
tj
 
B

Bob Phillips

Rob,

Try

=SUMPRODUCT(--(MOD(A1:A100,2)=1))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
J

JE McGimpsey

One way:

Odd:

=SUMPRODUCT(--(MOD(A1:A100,2)=1))

Even:

=SUMPRODUCT(--(MOD(A1:A100,2)=0),--ISNUMBER(A1:A100))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top