Question:
Need help sorting information in Excel?
g_kira1
2010-03-22 10:59:39 UTC
I have a column in an Excel document that I need to sort. Its a little complicated though. Here is a sample of the list, 228-340285, 228-358882, 228-456821, 228-462321, 228-042001, this list goes on for about 200 more. I need to sort these first by the last two numbers (85, 82, 21, 21, 01), and then start sorting numerically by the first four numbers (3402, 3588, 4568, 4623, 0420).

Can someone explain to me in layman's terms how to go about this?
Three answers:
gospieler
2010-03-22 11:21:51 UTC
Long explanation, simple to do... keep reading



You need to work with 2 formulas to be able to sort:

Lets say your data goes from A2:A202. I will give you the formula for A2 and then you copy it to the rest of cells



EXTRACT THE LAST TWO CHARACTERS:

• use the RIGHT function it will extract the right most character from a character string

= RIGHT( source_string, number_of_characters)

On cell B2 write this formula

=right(A2,2)



EXTRACT THE FIRST FOUR CHARACTERS:

use the LEFT function it will extract the left most character from a character string

= LEFT(source_string, number_of_characters)

On cell C2 write this formula

=LEFT(A2,4)



SORTING YOUR DATA

Now you can sort your data, using the values calculate on Column B (last 2 characters) and C (first 4 characters)

For a tutorial on how to sort the data, check

• Excel 2007 http://www.homeandlearn.co.uk/excel2007/excel2007s3p1.html

• Excel 2003 http://excel.tips.net/Pages/T002708_Sorting_a_Range_of_Cells.html



Hope this help
anonymous
2016-11-30 04:03:21 UTC
midsection a text textile container the place? To midsection the text textile interior the text textile container, on the style double click the container and the valuables Sheet could pop up. on the format tab, seem for the text textile Align assets and set it to based. get entry to could be very obtainable on your case. you are able to write a document that exhibits the condominium heritage of a particular guy or woman or who rented a particular action picture.
Andrew L
2010-03-22 11:14:56 UTC
Say your numbers are in column A. Put this in B1

=RIGHT(A1,2)

and drag it down column B. Put this in C1

=MID(A1,5,4)

and drag it down column C.



Now sort on all three columns, by column B descending then by C ascending.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...