#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Sorting in Excel

I have a list of various numbers and text that I want to sort numerically. Here is an example:
T300
D9745
P50
565
007
0245
052

Problems: 1.Getting leading zeros to show AND be recognized.
2. Sorting--when I try to sort, it will sort like 7,52, 245, 565, P50, T300, D9745. I want it to sort numerically first (007,0245,052,565) then alphabetically (D9745,P50, T300).
I'm assuming this is impossible, but any tips would be appreciated.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Break the Roles in SharePoint Lists
http://www.eggheadcafe.com/tutorials...in-sharep.aspx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Sorting in Excel

You are wanting to sort as if all values are text. First, create a helper
column, use formula:
=TEXT(A2,"@")
Then, select all your data you want sorted (helper column & original column)
and goto Data - Sort. Sort by helper column, treat numbers that look like
text as Text.

--
Best Regards,

Luke M
<Anita Marlay wrote in message ...
I have a list of various numbers and text that I want to sort numerically.
Here is an example:
T300
D9745
P50
565
007
0245
052

Problems: 1.Getting leading zeros to show AND be recognized.
2. Sorting--when I try to sort, it will sort like 7,52, 245, 565,
P50, T300, D9745. I want it to sort numerically first (007,0245,052,565)
then alphabetically (D9745,P50, T300).
I'm assuming this is impossible, but any tips would be appreciated.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Break the Roles in SharePoint Lists
http://www.eggheadcafe.com/tutorials...in-sharep.aspx



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Sorting in Excel

Precede the numbers with an apostrophe like

'007 '0245 '052

DataSort

"Sort anything that looks like a number, as a number"


Gord Dibben MS Excel MVP

On Thu, 01 Apr 2010 07:39:50 -0700, Anita Marlay wrote:

I have a list of various numbers and text that I want to sort numerically. Here is an example:
T300
D9745
P50
565
007
0245
052

Problems: 1.Getting leading zeros to show AND be recognized.
2. Sorting--when I try to sort, it will sort like 7,52, 245, 565, P50, T300, D9745. I want it to sort numerically first (007,0245,052,565) then alphabetically (D9745,P50, T300).
I'm assuming this is impossible, but any tips would be appreciated.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Break the Roles in SharePoint Lists
http://www.eggheadcafe.com/tutorials...in-sharep.aspx


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 Values Without Sorting Formulas SBX Excel Discussion (Misc queries) 2 April 12th 09 11:17 PM
sorting in excel amy Excel Discussion (Misc queries) 1 December 12th 08 04:33 PM
Automatic sorting (giving max and min) based on custom sorting lis Joe Lewis[_2_] Excel Worksheet Functions 4 November 23rd 08 05:12 AM
Sorting VLookup vs Sorting SumProduct Lauren Excel Discussion (Misc queries) 1 August 21st 07 12:19 AM
sorting with excel rpatel New Users to Excel 1 August 29th 05 07:40 PM


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