Excel Help

Dnyan

Board Regular
Joined
Mar 25, 2010
Messages
90
Hi,

I have a data of thousands of rows. and I want that data to be sort by numbers like.

<TABLE dir=ltr borderColor=#2de400 cellSpacing=1 cellPadding=2 width=330 border=1><TBODY><TR><TD width="27%" bgColor=#c0c0c0 height=4>
Actual Data​
</TD><TD width="31%" bgColor=#c0c0c0 height=4>
Wants to sort​
</TD><TD width="42%" bgColor=#c0c0c0 height=4>
Result After Sort​
</TD></TR><TR><TD width="27%" bgColor=#c0c0c0 height=4>
No​
</TD><TD width="31%" bgColor=#c0c0c0 height=4>
No.​
</TD><TD width="42%" bgColor=#c0c0c0 height=4>
No.​
</TD></TR><TR><TD width="27%" height=4>
2​
</TD><TD width="31%" height=4>
1​
</TD><TD width="42%" height=4>
1​
</TD></TR><TR><TD width="27%" height=4>
2​
</TD><TD width="31%" height=4>
1​
</TD><TD width="42%" height=4>
1​
</TD></TR><TR><TD width="27%" height=4>
3​
</TD><TD width="31%" height=4>
1​
</TD><TD width="42%" height=4>
1​
</TD></TR><TR><TD width="27%" height=4>
3​
</TD><TD width="31%" height=4>
1*​
</TD><TD width="42%" height=4>
2​
</TD></TR><TR><TD width="27%" height=4>
1*​
</TD><TD width="31%" height=4>
1*​
</TD><TD width="42%" height=4>
2​
</TD></TR><TR><TD width="27%" height=4>
1*​
</TD><TD width="31%" height=4>
1*​
</TD><TD width="42%" height=4>
2​
</TD></TR><TR><TD width="27%" height=4>
1​
</TD><TD width="31%" height=4>
2​
</TD><TD width="42%" height=4>
3​
</TD></TR><TR><TD width="27%" height=4>
2*​
</TD><TD width="31%" height=4>
2​
</TD><TD width="42%" height=4>
3​
</TD></TR><TR><TD width="27%" height=4>
3*​
</TD><TD width="31%" height=4>
2​
</TD><TD width="42%" height=4>
3​
</TD></TR><TR><TD width="27%" height=4>
2*​
</TD><TD width="31%" height=4>
2*​
</TD><TD width="42%" height=4>
1*​
</TD></TR><TR><TD width="27%" height=4>
3*​
</TD><TD width="31%" height=4>
2*​
</TD><TD width="42%" height=4>
1*​
</TD></TR><TR><TD width="27%" height=4>
1*​
</TD><TD width="31%" height=4>
2*​
</TD><TD width="42%" height=4>
1*​
</TD></TR><TR><TD width="27%" height=4>
1​
</TD><TD width="31%" height=4>
3​
</TD><TD width="42%" height=4>
2*​
</TD></TR><TR><TD width="27%" height=4>
2*​
</TD><TD width="31%" height=4>
3​
</TD><TD width="42%" height=4>
2*​
</TD></TR><TR><TD width="27%" height=4>
2​
</TD><TD width="31%" height=4>
3​
</TD><TD width="42%" height=4>
2*​
</TD></TR><TR><TD width="27%" height=4>
3*​
</TD><TD width="31%" height=4>
3*​
</TD><TD width="42%" height=4>
3*​
</TD></TR><TR><TD width="27%" height=4>
3​
</TD><TD width="31%" height=4>
3*​
</TD><TD width="42%" height=4>
3*​
</TD></TR><TR><TD width="27%" height=4>
1​
</TD><TD width="31%" height=4>
3*​
</TD><TD width="42%" height=4>
3*​
</TD></TR></TBODY></TABLE>

wants to sort data like this aslo if want to replace the * value it is replace both like if I replace 2* of all in sheets then it replace also 2.

Please suggest me the soluion of this.

Regards
Dnyan
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Here is one way ~

Assuming the data you wish to sort is in column A starting at cell A1

Select all column A, Click insert from the menu.
Now all your data you wish to sort is in column B
Select Cell A1 and enter or paste this formula ~
=IF(RIGHT(B1,1)="*",LEFT(B1)+0.1,B1)
and now fill down to the bottom of data in column B
Select all of column A again and click Copy, select Cell B1 and select paste special, values,
click OK.
Now select all column A and click delete from the menu.
Now you can sort as you wished.
You can now, from the menu click find and select, select replace, in the replace box type .1
in the with what box, type in what ever you want to replace the .1 with, click replace all.

Always save your sheet first, in case you stuff up.
 
Upvote 0
Highlight and right click choosing SORT and then CUSTOM SORT. Choose the column that contains your numbers on the left and on the far right under ORDER choose CUSTOM SORT from the drop down box. Under list entries type in: 1,2,3,1*,2*,3*. Hit the ADD button and close the box and you should be ready to go.
 
Upvote 0
Here is one way ~

Assuming the data you wish to sort is in column A starting at cell A1

Select all column A, Click insert from the menu.
Now all your data you wish to sort is in column B
Select Cell A1 and enter or paste this formula ~
=IF(RIGHT(B1,1)="*",LEFT(B1)+0.1,B1)
and now fill down to the bottom of data in column B
Select all of column A again and click Copy, select Cell B1 and select paste special, values,
click OK.
Now select all column A and click delete from the menu.
Now you can sort as you wished.
You can now, from the menu click find and select, select replace, in the replace box type .1
in the with what box, type in what ever you want to replace the .1 with, click replace all.

Always save your sheet first, in case you stuff up.

Hi,

Thank you very much its working

Thansk agian

Regards
Dnyan
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top