Select even or odd numbers

H

HUGO

From a list of numbers, how can I select even numbers or odd numbers and copy
them in another column?
 
M

Mike H

From a list of numbers, how can I select even numbers or odd numbers and copy
them in another column?

Hi,

With your list of numbers in column A starting in a1 put this in b1
and drag down as reguired

=ISODD(A1)

Apply an autofilter to the 2 columns and filter on TRUE in column B.
Copy column A and paste elsewhere. Filter on FALSE for even numbers

Mike
 
H

HUGO

Mike,
when I type =ISODD(A1) in b1, it gives me: #NAME. I don't think this is what
you mean, do you?
Hugo
 
T

T. Valko

Both the ISODD and ISEVEN functions are part of the Analysis ToolPak add-in
for versions of Excel prior to Excel 2007.

If you're getting a #NAME? error that probably means you don't have the ATP
installed. Goto Tools>Add-Ins and select the Analysis ToolPak if it's in the
list of available add-ins. If it's not listed then you'll have to install it
from your original installation disc.

Or, you can try one of these formulas assuming your numbers are integers:

This will return either 0 or 1, 0 for even numbers and 1 for odd numbers.

=MOD(A1,2)

This will return either Odd or Even:

=IF(MOD(A1,2),"Odd","Even")
 
D

David Biddulph

Yes, he did mean ISODD. Did you type ISODD into Excel help, and follow the
advice there?
 

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