473,480 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

sorting logical lists

hi everybody,

my question is as follows, i'll try to explain it using a current
situation I've had.

I've created a semi-numerological list (numbers with other
characters), consisting of the following data:

60000-1
60000-2
60000-3
60000-4
60000-5
60000-6
60000-7
60000-8
60000-9
60000-10
60000-11
60000-12

If you let excel sort this dataset (even if you format the cells as
numbers), it sorts as follows:

60000-1
60000-10
60000-11
60000-12
60000-2
60000-3
60000-4
60000-5
60000-6
60000-7
60000-8
60000-9

Is there a way to let excel sort this dataset correctly (as the top
list, that means)?

thanks in advance,
Leon van Gurp

Jul 11 '07 #1
3 1272
On Jul 11, 1:24 pm, leonl...@gmail.com wrote:

<snip>
Is there a way to let excel sort this dataset correctly (as the top
list, that means)?
That sounds like a question for an Excel newsgroup really... have you
tried asking there?

Jon

Jul 11 '07 #2
Hi,

<le******@gmail.comwrote in message
news:11*********************@57g2000hsv.googlegrou ps.com...
hi everybody,
Is there a way to let excel sort this dataset correctly (as the top
list, that means)?
Is this in excel ?
IF so you are in thr wrong group.

Post back if you are really doing this in C#
Jul 11 '07 #3
As others have pointed out, this is an excel question, and you would
probably have better luck in an Excel group.

However, this is a general problem-solving issue. Excel is not doing
the incorrect thing here, since it knows nothing about the format of your
string. It just knows it is text and tries to sort it accordingly.

What you want to do is have two calculated columns, one with the number
on the left, and another with the number on the right. Then, you sort based
on the first number, then the second.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<le******@gmail.comwrote in message
news:11*********************@57g2000hsv.googlegrou ps.com...
hi everybody,

my question is as follows, i'll try to explain it using a current
situation I've had.

I've created a semi-numerological list (numbers with other
characters), consisting of the following data:

60000-1
60000-2
60000-3
60000-4
60000-5
60000-6
60000-7
60000-8
60000-9
60000-10
60000-11
60000-12

If you let excel sort this dataset (even if you format the cells as
numbers), it sorts as follows:

60000-1
60000-10
60000-11
60000-12
60000-2
60000-3
60000-4
60000-5
60000-6
60000-7
60000-8
60000-9

Is there a way to let excel sort this dataset correctly (as the top
list, that means)?

thanks in advance,
Leon van Gurp

Jul 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

39
6004
by: Erlend Fuglum | last post by:
Hi everyone, I'm having some trouble sorting lists. I suspect this might have something to do with locale settings and/or character encoding/unicode. Consider the following example, text...
10
2152
by: Philippe C. Martin | last post by:
Hi, I'm looking for an easy algorithm - maybe Python can help: I start with X lists which intial sort is based on list #1. I want to reverse sort list #1 and have all other lists sorted...
2
8233
by: Kakarot | last post by:
I'm gona be very honest here, I suck at programming, *especially* at C++. It's funny because I actually like the idea of programming ... normally what I like I'm atleast decent at. But C++ is a...
4
2517
by: John Bullock | last post by:
Hello, I am at wit's end with an array sorting problem. I have a simple table-sorting function which must, at times, sort on columns that include entries with nothing but a space (@nbsp;). I...
7
10070
by: Foodbank | last post by:
Hi everyone. I'm having trouble with this radix sorting program. I've gotten some of it coded except for the actual sorting :( The book I'm teaching myself with (Data Structures Using C and...
5
1838
by: Dragan Matic | last post by:
If I have a table t with column c which is defined as char(5) and fill it with following values: insert into t (c) values (' 1') insert into t (c) values (' 2') insert into t (c) values...
4
4261
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
16
2725
by: Kittyhawk | last post by:
I would like to sort an Arraylist of objects on multiple properties. For instance, I have a Sort Index property and an ID property (both integers). So, the results of my sort would look like this:...
20
20865
by: martin-g | last post by:
Hi. Mostly I program in C++, and I'm not fluent in C# and .NET. In my last project I began to use LinkedList<and suddenly noticed that can't find a way to sort it. Does it mean I must implement...
7
2173
by: apotheos | last post by:
I can't seem to get this nailed down and I thought I'd toss it out there as, by gosh, its got to be something simple I'm missing. I have two different database tables of events that use different...
0
7051
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7054
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6750
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.