Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sorting Odd & Even Numbers In Excel

I was wondering if there was a way to sort odd & even numbers in Excel.
We have large spreadsheets of local street addresses that we would like
excel to sort all the even addresses & lump them all together & sort all
the odd street addresses & lump them all together. Is there a little
Macro that will do this for us. Any help would be greatly appreciated.

Thank You...Alan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Sorting Odd & Even Numbers In Excel

Assuming your house numbers are in a column by themselves in say Col B, and that you have a spare
column A (Just insert a column if not, or use a blank one to the right of the data).

With your first record in B2, in cell A2 put =ISODD(A2) and copy down, and you will now have a
series of TRUE / FALSE statements in Col A. Now just select ALL the data columns, and sort on Col
A, which will list all even number addresses first and then ODD. Then just delete it when you are
done.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL2K & XLXP

----------------------------------------------------------------------------
There's no 'I' in 'Team'
----------------------------------------------------------------------------



"Alan_NewsGroup" wrote in message
...
I was wondering if there was a way to sort odd & even numbers in Excel.
We have large spreadsheets of local street addresses that we would like
excel to sort all the even addresses & lump them all together & sort all
the odd street addresses & lump them all together. Is there a little
Macro that will do this for us. Any help would be greatly appreciated.

Thank You...Alan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Sorting Odd & Even Numbers In Excel

why not add a column and use MOD 2 to get 0's for even
and 1 for odd numbers. Then sort bu this column.

Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
I was wondering if there was a way to sort odd & even

numbers in Excel.
We have large spreadsheets of local street addresses

that we would like
excel to sort all the even addresses & lump them all

together & sort all
the odd street addresses & lump them all together. Is

there a little
Macro that will do this for us. Any help would be

greatly appreciated.

Thank You...Alan

.

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
sorting numbers with hyphens in excel mb-76 Excel Discussion (Misc queries) 1 March 26th 10 03:03 PM
sorting numbers and numbers that contain text in excel MZ Excel Discussion (Misc queries) 3 November 25th 09 07:45 AM
Sorting high numbers from low numbers between two rows scotty New Users to Excel 7 February 12th 07 09:38 PM
Sorting - cells containing numbers, numbers and letters Gunny Excel Discussion (Misc queries) 5 July 16th 06 01:22 AM
Sorting numbers with differing numbers of digits Trudy Excel Discussion (Misc queries) 5 March 4th 06 12:31 PM


All times are GMT +1. The time now is 02:15 AM.

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"