Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sorting section numbers doesn't give correct order

I have procedures where I track each section in a spreadsheet along with
requirements for the section. One column has the section numbers. Here is an
example to show the problem. Each number is in a seperate cell in the column.
I used semicolons here to seperate the numbers on the same line for posting
clarity. The cells are formatted as "text".

unsorted (also correct order): 1.3.2.1; 1.3.2.2; 1.3.2.3; 1.3.2.10; 1.3.2.11

sort ascending (incorrect order): 1.3.2.1; 1.3.2.10; 1.3.2.11; 1.3.2.2;
1.3.2.3

I cannot add leading zeroes manually such as 1.3.2.1 - 1.3.2.01.
Nor can I create a special column to manipulate these.
They are dynamic, thousands of rows long, and change constantly. hence you
see the need for proper sorting , easily.

VBA may or may not be able to be used in this application due to security
restrictions. But I'll entertain VBA solutions.

Thanks for any suggestions.
Facmanboss
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Sorting section numbers doesn't give correct order

<Nor can I create a special column to manipulate these

Why not? You can hide the column if you don't want to see it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"facmanboss" wrote in message
...
I have procedures where I track each section in a spreadsheet along with
requirements for the section. One column has the section numbers. Here is
an
example to show the problem. Each number is in a seperate cell in the
column.
I used semicolons here to seperate the numbers on the same line for
posting
clarity. The cells are formatted as "text".

unsorted (also correct order): 1.3.2.1; 1.3.2.2; 1.3.2.3; 1.3.2.10;
1.3.2.11

sort ascending (incorrect order): 1.3.2.1; 1.3.2.10; 1.3.2.11; 1.3.2.2;
1.3.2.3

I cannot add leading zeroes manually such as 1.3.2.1 - 1.3.2.01.
Nor can I create a special column to manipulate these.
They are dynamic, thousands of rows long, and change constantly. hence you
see the need for proper sorting , easily.

VBA may or may not be able to be used in this application due to security
restrictions. But I'll entertain VBA solutions.

Thanks for any suggestions.
Facmanboss


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Sorting section numbers doesn't give correct order

If this were me, I would create a helper column, which defines the sort
order.

In your case, if you always have 4 sections as shown, the formula would be
pretty straightforward:
=left(a1,1)*10000+mid(a1,3,1)*1000+mid(a1,5,1)*100 +right(a1,len(a1)-6)

Even if all sections have a variable number of digits, you can still devise
a formula. Now sort by the helper column. If you don't want to see it, hide
it.

If you insist on not having a helper column, use VBA. Create the sort
column, sort, then delete the column.

Regards,
Fred.

"facmanboss" wrote in message
...
I have procedures where I track each section in a spreadsheet along with
requirements for the section. One column has the section numbers. Here is
an
example to show the problem. Each number is in a seperate cell in the
column.
I used semicolons here to seperate the numbers on the same line for
posting
clarity. The cells are formatted as "text".

unsorted (also correct order): 1.3.2.1; 1.3.2.2; 1.3.2.3; 1.3.2.10;
1.3.2.11

sort ascending (incorrect order): 1.3.2.1; 1.3.2.10; 1.3.2.11; 1.3.2.2;
1.3.2.3

I cannot add leading zeroes manually such as 1.3.2.1 - 1.3.2.01.
Nor can I create a special column to manipulate these.
They are dynamic, thousands of rows long, and change constantly. hence you
see the need for proper sorting , easily.

VBA may or may not be able to be used in this application due to security
restrictions. But I'll entertain VBA solutions.

Thanks for any suggestions.
Facmanboss


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Sorting section numbers doesn't give correct order

My "Special Sort" Excel add-in has two dozen ways to sort not available
in Excel. It will do the decimal sort you need.
The trial version of the program is free and available to those who email
and request it. Remove xxx from my email address...

james.coneXXX at comcast.comXXX
Please include your real name and geographic location.
--
Jim Cone
Portland, Oregon USA



"facmanboss"

wrote in message
I have procedures where I track each section in a spreadsheet along with
requirements for the section. One column has the section numbers. Here is an
example to show the problem. Each number is in a seperate cell in the column.
I used semicolons here to seperate the numbers on the same line for posting
clarity. The cells are formatted as "text".
unsorted (also correct order): 1.3.2.1; 1.3.2.2; 1.3.2.3; 1.3.2.10; 1.3.2.11

sort ascending (incorrect order): 1.3.2.1; 1.3.2.10; 1.3.2.11; 1.3.2.2;
1.3.2.3

I cannot add leading zeroes manually such as 1.3.2.1 - 1.3.2.01.
Nor can I create a special column to manipulate these.
They are dynamic, thousands of rows long, and change constantly. hence you
see the need for proper sorting , easily.
VBA may or may not be able to be used in this application due to security
restrictions. But I'll entertain VBA solutions.
Thanks for any suggestions.
Facmanboss
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
what formulas will give correct results TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 February 26th 07 02:13 AM
Won't give correct answer Loren Excel Worksheet Functions 4 January 5th 07 06:49 PM
How do I get the correct order for nested subtotals cyn Excel Discussion (Misc queries) 1 October 26th 06 08:22 PM
Sorting names and numbers in order with the highest total Red Shoes Excel Worksheet Functions 1 June 23rd 06 09:23 AM
Sorting order - text and numbers jmt Excel Discussion (Misc queries) 2 April 4th 05 01:25 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"