Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to sort my colum by the last two digits of the number in each cell.
EX: 50201.1001 50201.1002 50201.1003 50201.2001 50201.2002 50201.2003 50201.3001 50201.3002 50201.3003 I want to sort by the last two digist of 01,02,03 of my column. Does anyone have any idea how to do this. Or if it is even possible. If you do please can you explain to me step by step what I will have to do to accomplish this task. Thanks for your help. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Put your data in column A and in B1 enter:
=--RIGHT(A1,2) and copy down then sort both cols A & B by B -- Gary''s Student - gsnu200826 "mi20chelle02" wrote: I am trying to sort my colum by the last two digits of the number in each cell. EX: 50201.1001 50201.1002 50201.1003 50201.2001 50201.2002 50201.2003 50201.3001 50201.3002 50201.3003 I want to sort by the last two digist of 01,02,03 of my column. Does anyone have any idea how to do this. Or if it is even possible. If you do please can you explain to me step by step what I will have to do to accomplish this task. Thanks for your help. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi
most custom sort are done by adding a helper column and using the helper column as the primary sort. in a blank column next to your data, enter this formula.... assuming data starts at A2... =right(A2,2) this will return the last to digits of the data in A2. Copy the formula down as far as you need. now just sort the data, including the helper column as primary sort. other colunms as secondary/other. the helper column is just a tool, not part of the data so after sort, you can delete if no longer needed or hided if you need to sort frequently. Regards FSt1 "mi20chelle02" wrote: I am trying to sort my colum by the last two digits of the number in each cell. EX: 50201.1001 50201.1002 50201.1003 50201.2001 50201.2002 50201.2003 50201.3001 50201.3002 50201.3003 I want to sort by the last two digist of 01,02,03 of my column. Does anyone have any idea how to do this. Or if it is even possible. If you do please can you explain to me step by step what I will have to do to accomplish this task. Thanks for your help. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way is to use a helper column.
Assume the values are in column A, and column B is blank. If the values are Text, enter B1: =RIGHT(A1,2) if the values are numbers, you're safer using B1: =RIGHT(TEXT(A1,"0.0000"),2) Sort both columns using column B to sort by. In article , mi20chelle02 wrote: I am trying to sort my colum by the last two digits of the number in each cell. EX: 50201.1001 50201.1002 50201.1003 50201.2001 50201.2002 50201.2003 50201.3001 50201.3002 50201.3003 I want to sort by the last two digist of 01,02,03 of my column. Does anyone have any idea how to do this. Or if it is even possible. If you do please can you explain to me step by step what I will have to do to accomplish this task. Thanks for your help. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello!
With VBA http://cjoint.com/?borVhnswJy Sort with 2 last digits Sub Sort() [B:B].Insert Shift:=xlToRight n = [A65000].End(xlUp).Row For Each c In Range("A2:A" & n) c.Offset(0, 1) = Right(c, 2) Next c Range("A2:B" & n).Sort Key1:=[B2], Order1:=xlAscending, Header:=xlGuess [B:B].Delete End Sub JB http://boisgontierjacques.free.fr On 14 jan, 16:21, mi20chelle02 wrote: I am trying to sort my colum by the last two digits of the number in each cell. EX: 50201.1001 50201.1002 50201.1003 50201.2001 50201.2002 50201.2003 50201.3001 50201.3002 50201.3003 I want to sort by the last two digist of 01,02,03 of my column. *Does anyone have any idea how to do this. *Or if it is even possible. *If you do please can you explain to me step by step what I will have to do to accomplish this task. * Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sort by numbers of digits in cells | Excel Worksheet Functions | |||
How do I sort the last 3 digits first and then the first 4 digit?. | Excel Worksheet Functions | |||
How do I sort different combination of a 4 digits number | Excel Discussion (Misc queries) | |||
Sort by last 2 digits | Excel Discussion (Misc queries) | |||
Sort by last 2 digits | Excel Worksheet Functions |