Excel Sort

T

Templar

I have a column of odd and even numbers and would like to move numbers
ending in a odd number to one column and those ending in an even number in
a separate column. Could you expain how I might do that?

Thank you.

1800
1801
1802
1803
1805
1805
1807
1808
1809
1806
1806
1806
1808
1811
1811
 
T

Teethless mama

Try this:

data - is a defined name range

odd values:
In B2:
=IF(ISERR(SMALL(IF(MOD(data,2)=1,ROW(INDIRECT("1:"&ROWS(data)))),ROWS($1:1))),"",INDEX(data,SMALL(IF(MOD(data,2)=1,ROW(INDIRECT("1:"&ROWS(data)))),ROWS($1:1))))

even values
In C2:
=IF(ISERR(SMALL(IF(MOD(data,2)=0,ROW(INDIRECT("1:"&ROWS(data)))),ROWS($1:1))),"",INDEX(data,SMALL(IF(MOD(data,2)=0,ROW(INDIRECT("1:"&ROWS(data)))),ROWS($1:1))))

Both formulae are required Ctrl+Shift+Enter, not just Enter
copy down as far as needed
 
T

Teethless mama

Your formulae don't work
=IF(MOD(A2),A2,"") in the odd column
=IF(MOD(A2),"",A2) in the even column

try like this:
=IF(MOD(A2,2),A2,"")
=IF(MOD(A2,2),"",A2)
 

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