Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How can i sort a database on numbers?

I have a database with adresses of people. I have to print the database in
order of housenumber. The streetname and housenumber are in the same cell. If
i sort my database on the adress, i get the numbers starting with 1 first.
Like 1, 10, 11, 2, 22, 3, 37. How can i sort the right way?

Sylvester
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How can i sort a database on numbers?

Sylvester

Having the number and address in the same cell produces text formatted data.

The sort order is correct for this format.

The best way to get around this is to break out the number and address into two
columns and sort on the column with numbers.

Make sure you select all columns before sorting.


Gord Dibben MS Excel MVP

On Mon, 31 Jul 2006 20:15:02 -0700, Sylvester
wrote:

I have a database with adresses of people. I have to print the database in
order of housenumber. The streetname and housenumber are in the same cell. If
i sort my database on the adress, i get the numbers starting with 1 first.
Like 1, 10, 11, 2, 22, 3, 37. How can i sort the right way?

Sylvester


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How can i sort a database on numbers?

Thank you Gord, but is there an easy way to break up de data? If i use "text
to collums" i can't split text from numbers. I tried using the space as
separation but all i get is a a lot of cells with a piece of the adress.
Sometime a streetname has more then one word and one number. And sometimes
the housenumber has an housenumberextension (like 35a).

Regards,

Sylvester

"Gord Dibben" wrote:

Sylvester

Having the number and address in the same cell produces text formatted data.

The sort order is correct for this format.

The best way to get around this is to break out the number and address into two
columns and sort on the column with numbers.

Make sure you select all columns before sorting.


Gord Dibben MS Excel MVP

On Mon, 31 Jul 2006 20:15:02 -0700, Sylvester
wrote:

I have a database with adresses of people. I have to print the database in
order of housenumber. The streetname and housenumber are in the same cell. If
i sort my database on the adress, i get the numbers starting with 1 first.
Like 1, 10, 11, 2, 22, 3, 37. How can i sort the right way?

Sylvester



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How can i sort a database on numbers?

Sounds like a nightmare.

Copy the column so's you have two columns the same.

To break out just the numbers try DataText to ColumnsDelimited bySpaceNext.

Select columns other than the numbers column and "do not import".

The only column returned is the number.

Sort on that.

I don't know what you will do with the 35a's

David McRitchie has written macros for parsing street addresses.

http://www.mvps.org/dmcritchie/excel/join.htm#septerm


Gord


On Mon, 31 Jul 2006 20:58:01 -0700, Sylvester
wrote:

Thank you Gord, but is there an easy way to break up de data? If i use "text
to collums" i can't split text from numbers. I tried using the space as
separation but all i get is a a lot of cells with a piece of the adress.
Sometime a streetname has more then one word and one number. And sometimes
the housenumber has an housenumberextension (like 35a).

Regards,

Sylvester

"Gord Dibben" wrote:

Sylvester

Having the number and address in the same cell produces text formatted data.

The sort order is correct for this format.

The best way to get around this is to break out the number and address into two
columns and sort on the column with numbers.

Make sure you select all columns before sorting.


Gord Dibben MS Excel MVP

On Mon, 31 Jul 2006 20:15:02 -0700, Sylvester
wrote:

I have a database with adresses of people. I have to print the database in
order of housenumber. The streetname and housenumber are in the same cell. If
i sort my database on the adress, i get the numbers starting with 1 first.
Like 1, 10, 11, 2, 22, 3, 37. How can i sort the right way?

Sylvester




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 and return column numbers [email protected] Excel Worksheet Functions 5 May 16th 06 11:39 AM
Auto insert page breaks in Excel, based on a sort of numbers peterc89 Excel Discussion (Misc queries) 0 November 9th 05 03:41 PM
sort "numbers" with decimals Melissa Excel Discussion (Misc queries) 4 September 2nd 05 02:28 PM
Sorting numbers and text separately Tim C Excel Discussion (Misc queries) 8 July 21st 05 12:53 AM
How to sort random numbers in columns webehere Excel Discussion (Misc queries) 3 January 15th 05 12:24 PM


All times are GMT +1. The time now is 09:53 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"