#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Excel Sort

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

--
Templar
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Excel Sort

=IF(MOD(A2),A2,"") in the odd column
=IF(MOD(A2),"",A2) in the even column
--
David Biddulph

"Templar" wrote in message
...
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

--
Templar



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Excel Sort

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)))),ROW S($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)))),ROW S($1:1))))

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


"Templar" wrote:

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

--
Templar

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Excel Sort

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)


"David Biddulph" wrote:

=IF(MOD(A2),A2,"") in the odd column
=IF(MOD(A2),"",A2) in the even column
--
David Biddulph

"Templar" wrote in message
...
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

--
Templar




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Excel Sort

Yes, absolutely right.
--
David Biddulph

"Teethless mama" wrote in message
...
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)


"David Biddulph" wrote:

=IF(MOD(A2),A2,"") in the odd column
=IF(MOD(A2),"",A2) in the even column
--
David Biddulph

"Templar" wrote in message
...
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

--
Templar






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
Sort sheet based on particuilar sort order Also Excel Worksheet Functions 4 January 3rd 08 09:31 AM
sort function for dates does not sort properly in Office 2007 Exc. Rosalie Excel Worksheet Functions 1 November 22nd 07 10:25 PM
Sort from SQL view does not sort in EXCEL Pat M - City of Reno Excel Discussion (Misc queries) 0 August 31st 07 07:38 PM
Excel sort by Fill Color by custom list sort Dash4Cash Excel Discussion (Misc queries) 2 July 29th 05 10:45 PM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 08:37 PM


All times are GMT +1. The time now is 01:07 PM.

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"