Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default sorting problem

Hello,

is it somehow possible to sort something like this:

37/05
39/05
147/03
44/05
48/05
264/04
42/05
41/05
43/05
45/05
41/04
47/05
251/04
258/04
46/05
42/05

The 2 digit to the right of the slash is the year
The digits to the left of the slash are consecutive numbers, starting
with "1" for each year.

Can this be sorted, so that the last entry is on top and the first
entry is at the bottom?

Thanks for any help

Regards,
Norbert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default sorting problem

I'm sure I've misunderstood the question because you tried to
describe what the data is, but the only question I see is turning
the list upside down.

B1: 1 B2: 2 use the fill handle to copy down,
sort the entire sheet on column B descending.

If you want a macro to reverse only those cells (top to bottom), see
http://www.mvps.org/dmcritchie/excel/join.htm#reversi
It actually reverses any rectangular selection.

--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Orion" wrote in message ...
Hello,

is it somehow possible to sort something like this:

37/05
39/05
147/03
44/05
48/05
264/04
42/05
41/05
43/05
45/05
41/04
47/05
251/04
258/04
46/05
42/05

The 2 digit to the right of the slash is the year
The digits to the left of the slash are consecutive numbers, starting
with "1" for each year.

Can this be sorted, so that the last entry is on top and the first
entry is at the bottom?

Thanks for any help

Regards,
Norbert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default sorting problem

Use Text to Columns with "/" as the delimiter. You can now sort both columns
descending by year and descending by entry number. Concatenate the sorted
columns back together with the "/" in between columns. =Concatenate(columnB
& / & columnC).

Mike F
"Orion" wrote in message
...
Hello,

is it somehow possible to sort something like this:

37/05
39/05
147/03
44/05
48/05
264/04
42/05
41/05
43/05
45/05
41/04
47/05
251/04
258/04
46/05
42/05

The 2 digit to the right of the slash is the year
The digits to the left of the slash are consecutive numbers, starting
with "1" for each year.

Can this be sorted, so that the last entry is on top and the first
entry is at the bottom?

Thanks for any help

Regards,
Norbert



  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default sorting problem

One way is to create helper columns from the data. Assume
that the data is in column A then compute column for the
numerical sequence using.....

=VALUE(MID(A2,1,FIND("/",A2)-1))

then compute a column for the year using....

=RIGHT(A2,2)

then if you sort on the YEAR (descending) and the SEQUENCE
(descending) it will sort ok.

Cheers
Nigel

-----Original Message-----
Hello,

is it somehow possible to sort something like this:

37/05
39/05
147/03
44/05
48/05
264/04
42/05
41/05
43/05
45/05
41/04
47/05
251/04
258/04
46/05
42/05

The 2 digit to the right of the slash is the year
The digits to the left of the slash are consecutive

numbers, starting
with "1" for each year.

Can this be sorted, so that the last entry is on top and

the first
entry is at the bottom?

Thanks for any help

Regards,
Norbert
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default sorting problem

Hi David,

I do not understand what you mean with turning the list upside down.
It is not sorted yet.
Anyway, thanks for your help.

Norbert



On Tue, 8 Mar 2005 06:26:09 -0500, "David McRitchie"
wrote:

I'm sure I've misunderstood the question because you tried to
describe what the data is, but the only question I see is turning
the list upside down.

B1: 1 B2: 2 use the fill handle to copy down,
sort the entire sheet on column B descending.

If you want a macro to reverse only those cells (top to bottom), see
http://www.mvps.org/dmcritchie/excel/join.htm#reversi
It actually reverses any rectangular selection.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default sorting problem

Hi Norbert,
Upside down is self explanatory (reversed) 1,77,14 -- 14, 77, 1

Since the other solutons that separated at the slash and sorted
on two columns didn't answer your question either (or did they),
then I have no idea of show you want the data sorted and what
the "1" has to do with anything. In other words what is the data
shown supposed to look like once "sorted".
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm

"Orion" wrote in message
I do not understand what you mean with turning the list upside down.
It is not sorted yet.
Anyway, thanks for your help.



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
A Sorting Problem k1ngr Excel Discussion (Misc queries) 2 March 2nd 08 12:09 PM
Another sorting problem [email protected] Excel Discussion (Misc queries) 0 April 12th 07 09:37 PM
sorting problem [email protected] Excel Discussion (Misc queries) 2 April 12th 07 06:01 PM
Not Sorting Problem? lawdoggy Excel Worksheet Functions 0 August 25th 05 07:49 PM
Sorting problem Chris Excel Worksheet Functions 1 November 3rd 04 11:27 PM


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