A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Custom Sorting



 
 
Thread Tools Display Modes
  #1  
Old May 19th, 2009, 05:04 PM posted to microsoft.public.excel.misc
A. Roger[_2_]
external usenet poster
 
Posts: 1
Default Custom Sorting

Hello,
I have an inventory sorted by ascending part numbers(smaller to largesr).
But i would like for the order to start with numbers that begin with a 0 then
with numbers that start 1 and so on, regardless if the number is smaller or
bigger.

Is this possible?

  #2  
Old May 19th, 2009, 05:42 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Custom Sorting

It sounds like you want the entry sorted like it was text.

I'd insert a new column and use a formula like:
=a1&""
to convert the number to text

Wait, I guess, you'd want to keep that same format:

So maybe something like:
=text(a1,"00000")
for 5 digit part numbers.

A. Roger wrote:

Hello,
I have an inventory sorted by ascending part numbers(smaller to largesr).
But i would like for the order to start with numbers that begin with a 0 then
with numbers that start 1 and so on, regardless if the number is smaller or
bigger.

Is this possible?


--

Dave Peterson
  #3  
Old May 19th, 2009, 05:49 PM posted to microsoft.public.excel.misc
FSt1
external usenet poster
 
Posts: 2,788
Default Custom Sorting

hi
maybe. custom sorts are usually done with the use of a helper column. you
could add a column at beginning of the data or use the last column next to
your data.
in the column, enter the following formula....
=left(A2,1)
this will pull the first number from your inventory number.(accually if some
of your numbers start with zero, they are probably formated as text)
you can then sort your data using the helper column as the primary sort, and
maybe another column as a secondary sort.
or maybe you need the first 2 numbers of your inventory number
=left(a2,2)
look up the left function in xl help for more details.

regards
FSt1

"A. Roger" wrote:

Hello,
I have an inventory sorted by ascending part numbers(smaller to largesr).
But i would like for the order to start with numbers that begin with a 0 then
with numbers that start 1 and so on, regardless if the number is smaller or
bigger.

Is this possible?

  #4  
Old May 19th, 2009, 05:49 PM posted to microsoft.public.excel.misc
Otto Moehrbach[_2_]
external usenet poster
 
Posts: 716
Default Custom Sorting

Yes. You would need VBA (programming) for that. Basically, the VBA would
build an extra column with numbers that would subsequently be used to sort
by. One question, though. Say that you have a group of numbers that ALL
started with, say, 2. How would you want that group sorted? Not sorted
within the larger group of all numbers, just within that one group. HTH
Otto
"A. Roger" wrote in message
...
Hello,
I have an inventory sorted by ascending part numbers(smaller to largesr).
But i would like for the order to start with numbers that begin with a 0
then
with numbers that start 1 and so on, regardless if the number is smaller
or
bigger.

Is this possible?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.