#1   Report Post  
ananga
 
Posts: n/a
Default sorting error

Suppose I have 6Y,3M in one cell 6Y,7M in another cell and 6Y,10M in another
cell.While I am sorting in descending order 6Y,10M shoul come first then
6Y,7M, then 6Y,3M should come. But in my case 6Y,10M comes last.But if I am
inserting one 0 my problem can be solved ,but without this how can it be
done.Or If I have to insert 0 , how this process be automated by using any
function.becauz I have lots of data , so 0 cann't be inseted manually.

  #2   Report Post  
Jim Cone
 
Posts: n/a
Default

ananga,

Since you asked "how this process be automated"
Maybe this recent post of mine will help...

http://makeashorterlink.com/?R2B662F4B

The code in the post creates additional data columns that
can be used to sort your data.

Jim Cone
San Francisco, USA


"ananga" wrote in message
...
Suppose I have 6Y,3M in one cell 6Y,7M in another cell and 6Y,10M in another
cell.While I am sorting in descending order 6Y,10M shoul come first then
6Y,7M, then 6Y,3M should come. But in my case 6Y,10M comes last.But if I am
inserting one 0 my problem can be solved ,but without this how can it be
done.Or If I have to insert 0 , how this process be automated by using any
function.becauz I have lots of data , so 0 cann't be inseted manually.

  #3   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,
If there are always two characters (e.g., 6Y or something like it)
before the comma, and only one letter at the right hand side end (e.g., 7M or
10M and not 7NM or 10NM), you can create a helper column with a formula that
would extract the numbers by which you can sort the spreadsheet.
For example, if your data are in column A starting at row 2, enter the
following formula in a row 2 of a blank column (say B2)

=(LEFT(MID(A2,4,20),LEN(MID(A2,4,20))-1))*1

and fill-in the column down to the last data-containing row. Now, sort the
spreadsheet by column B in descending order.
Regards,
B.R.Ramachandran

"ananga" wrote:

Suppose I have 6Y,3M in one cell 6Y,7M in another cell and 6Y,10M in another
cell.While I am sorting in descending order 6Y,10M shoul come first then
6Y,7M, then 6Y,3M should come. But in my case 6Y,10M comes last.But if I am
inserting one 0 my problem can be solved ,but without this how can it be
done.Or If I have to insert 0 , how this process be automated by using any
function.becauz I have lots of data , so 0 cann't be inseted manually.

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
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 7 March 7th 05 06:29 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 0 February 28th 05 06:26 PM
Problem with VBA returning the contents of a long formula. [email protected] Excel Discussion (Misc queries) 2 February 23rd 05 12:14 AM
ERROR Pinto1uk Excel Discussion (Misc queries) 1 February 8th 05 03:15 AM
sorting error abstsogds Excel Worksheet Functions 2 December 6th 04 07:19 PM


All times are GMT +1. The time now is 09:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"