Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How? Sort Custom Numbering Scheme

I cannot sort properly a document numbering scheme. Currently using Excel
2007. The data is formatted as text. I keep procedure section numbers in one
column and details about each section in a seperate column. A third column
and further columns keeps cross-referenxce information. The spreadsheet may
be thousands of rows long. Details about the sections constantly change or
the data needs to be presented in different ways. Therefore, I need to
constantly sort. Filtering is no problem.

Here is an example of the numbering scheme that will not sort properly.
Sorting should be left-to-right between each decimal point. In Excel, each
number is on it's own row in the same column. The scheme may also have
letters rather than numbers or letters combined with numbers (e.g., 10a, 10b)
in any position.

Desired Excel Ascend. Sort
2.2.1 2.2.1
2.2.1a 2.2.1a
2.2.3 2.2.3
2.2.4 2.2.4
2.3.1.1 2.3.1.1
2.3.1.1a 2.3.1.10
2.3.1.2 2.3.1.11
2.3.1.2a 2.3.1.1a
2.3.1.2d 2.3.1.2
2.3.1.3 2.3.1.2a
2.3.1.10 2.3.1.2d
2.3.1.11 2.3.1.3
2.3.1a.3 2.3.10.1
2.3.1a.3a 2.3.10.12
2.3.1b.3.1a 2.3.10.13
2.3.10.1 2.3.10.2
2.3.10.2 2.3.10.3
2.3.10.3 2.3.1a.3
2.3.10.12 2.3.1a.3a
2.3.10.13 2.3.1b.3.1a

I cannot add leading zeroes to the numbers. (e.g., 2.3.1.1 - 02.03.01.01).
Numbering scheme does not allow. I cannot manually create an artificial sort
column that massages the numbers to sort properly as the sheet data
constantly changes and is thousands of rows long. VBA may be used as a last
resort.

Any help appreciated.
Facmanboss


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How? Sort Custom Numbering Scheme

Hi,

You need helper column. Assuming your numbers are in A1 down put this in B1

=MID(SUMPRODUCT(--MID("01"&A1,SMALL((ROW($A$1:$A$300)-1)*ISNUMBER(-MID("01"&A1,ROW($A$1:$A$300),1)),ROW($A$1:$A$300)) +1,1),10^(300-ROW($A$1:$A$300))),2,300)

Enter the formula as an array (see below) and double click the fill handle
to fill the formula down. Select both columns and sort ascending on the
helper column.

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array.

Credit to Lars-Ã…ke Aspelin for the formula to extract the numbers.

Mike

"facmanboss" wrote:

I cannot sort properly a document numbering scheme. Currently using Excel
2007. The data is formatted as text. I keep procedure section numbers in one
column and details about each section in a seperate column. A third column
and further columns keeps cross-referenxce information. The spreadsheet may
be thousands of rows long. Details about the sections constantly change or
the data needs to be presented in different ways. Therefore, I need to
constantly sort. Filtering is no problem.

Here is an example of the numbering scheme that will not sort properly.
Sorting should be left-to-right between each decimal point. In Excel, each
number is on it's own row in the same column. The scheme may also have
letters rather than numbers or letters combined with numbers (e.g., 10a, 10b)
in any position.

Desired Excel Ascend. Sort
2.2.1 2.2.1
2.2.1a 2.2.1a
2.2.3 2.2.3
2.2.4 2.2.4
2.3.1.1 2.3.1.1
2.3.1.1a 2.3.1.10
2.3.1.2 2.3.1.11
2.3.1.2a 2.3.1.1a
2.3.1.2d 2.3.1.2
2.3.1.3 2.3.1.2a
2.3.1.10 2.3.1.2d
2.3.1.11 2.3.1.3
2.3.1a.3 2.3.10.1
2.3.1a.3a 2.3.10.12
2.3.1b.3.1a 2.3.10.13
2.3.10.1 2.3.10.2
2.3.10.2 2.3.10.3
2.3.10.3 2.3.1a.3
2.3.10.12 2.3.1a.3a
2.3.10.13 2.3.1b.3.1a

I cannot add leading zeroes to the numbers. (e.g., 2.3.1.1 - 02.03.01.01).
Numbering scheme does not allow. I cannot manually create an artificial sort
column that massages the numbers to sort properly as the sheet data
constantly changes and is thousands of rows long. VBA may be used as a last
resort.

Any help appreciated.
Facmanboss


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How? Sort Custom Numbering Scheme

Hmmm,

I never checked carefully enough, doesn't work.

Mike

"Mike H" wrote:

Hi,

You need helper column. Assuming your numbers are in A1 down put this in B1

=MID(SUMPRODUCT(--MID("01"&A1,SMALL((ROW($A$1:$A$300)-1)*ISNUMBER(-MID("01"&A1,ROW($A$1:$A$300),1)),ROW($A$1:$A$300)) +1,1),10^(300-ROW($A$1:$A$300))),2,300)

Enter the formula as an array (see below) and double click the fill handle
to fill the formula down. Select both columns and sort ascending on the
helper column.

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array.

Credit to Lars-Ã…ke Aspelin for the formula to extract the numbers.

Mike

"facmanboss" wrote:

I cannot sort properly a document numbering scheme. Currently using Excel
2007. The data is formatted as text. I keep procedure section numbers in one
column and details about each section in a seperate column. A third column
and further columns keeps cross-referenxce information. The spreadsheet may
be thousands of rows long. Details about the sections constantly change or
the data needs to be presented in different ways. Therefore, I need to
constantly sort. Filtering is no problem.

Here is an example of the numbering scheme that will not sort properly.
Sorting should be left-to-right between each decimal point. In Excel, each
number is on it's own row in the same column. The scheme may also have
letters rather than numbers or letters combined with numbers (e.g., 10a, 10b)
in any position.

Desired Excel Ascend. Sort
2.2.1 2.2.1
2.2.1a 2.2.1a
2.2.3 2.2.3
2.2.4 2.2.4
2.3.1.1 2.3.1.1
2.3.1.1a 2.3.1.10
2.3.1.2 2.3.1.11
2.3.1.2a 2.3.1.1a
2.3.1.2d 2.3.1.2
2.3.1.3 2.3.1.2a
2.3.1.10 2.3.1.2d
2.3.1.11 2.3.1.3
2.3.1a.3 2.3.10.1
2.3.1a.3a 2.3.10.12
2.3.1b.3.1a 2.3.10.13
2.3.10.1 2.3.10.2
2.3.10.2 2.3.10.3
2.3.10.3 2.3.1a.3
2.3.10.12 2.3.1a.3a
2.3.10.13 2.3.1b.3.1a

I cannot add leading zeroes to the numbers. (e.g., 2.3.1.1 - 02.03.01.01).
Numbering scheme does not allow. I cannot manually create an artificial sort
column that massages the numbers to sort properly as the sheet data
constantly changes and is thousands of rows long. VBA may be used as a last
resort.

Any help appreciated.
Facmanboss


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default How? Sort Custom Numbering Scheme

I suggest you go with your last resort.

Regards,
Fred.

"facmanboss" wrote in message
...
I cannot sort properly a document numbering scheme. Currently using Excel
2007. The data is formatted as text. I keep procedure section numbers in
one
column and details about each section in a seperate column. A third column
and further columns keeps cross-referenxce information. The spreadsheet
may
be thousands of rows long. Details about the sections constantly change or
the data needs to be presented in different ways. Therefore, I need to
constantly sort. Filtering is no problem.

Here is an example of the numbering scheme that will not sort properly.
Sorting should be left-to-right between each decimal point. In Excel, each
number is on it's own row in the same column. The scheme may also have
letters rather than numbers or letters combined with numbers (e.g., 10a,
10b)
in any position.

Desired Excel Ascend. Sort
2.2.1 2.2.1
2.2.1a 2.2.1a
2.2.3 2.2.3
2.2.4 2.2.4
2.3.1.1 2.3.1.1
2.3.1.1a 2.3.1.10
2.3.1.2 2.3.1.11
2.3.1.2a 2.3.1.1a
2.3.1.2d 2.3.1.2
2.3.1.3 2.3.1.2a
2.3.1.10 2.3.1.2d
2.3.1.11 2.3.1.3
2.3.1a.3 2.3.10.1
2.3.1a.3a 2.3.10.12
2.3.1b.3.1a 2.3.10.13
2.3.10.1 2.3.10.2
2.3.10.2 2.3.10.3
2.3.10.3 2.3.1a.3
2.3.10.12 2.3.1a.3a
2.3.10.13 2.3.1b.3.1a

I cannot add leading zeroes to the numbers. (e.g., 2.3.1.1 -
02.03.01.01).
Numbering scheme does not allow. I cannot manually create an artificial
sort
column that massages the numbers to sort properly as the sheet data
constantly changes and is thousands of rows long. VBA may be used as a
last
resort.

Any help appreciated.
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
excel 2007 sorting issue with numbering scheme facmanboss Excel Discussion (Misc queries) 1 February 11th 09 12:50 PM
How to change custom color's tooltips from "Color Scheme"? Andy Smith[_2_] Excel Discussion (Misc queries) 0 June 10th 08 07:27 PM
custom color scheme for 3d surface map [email protected] Charts and Charting in Excel 1 September 28th 07 02:06 AM
Custom Section Numbering MAnderson Excel Worksheet Functions 6 June 27th 07 12:42 AM
restoring default fill colors, & saving with a custom color scheme WiFiMike2006 Excel Discussion (Misc queries) 3 March 28th 07 06:37 PM


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