![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Posts: 251
|
Hi,
Is there any way that I can sort the data. In my column A I have numbers, like 1,2,24B, 13A, 11B. its mix of numbers and letters. Is there any way that you can sort this column A.If I sort the data like that, then it does not work. Any macro for that? Thanks in Advance. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Explain why "13A" should be sorted before "11B".
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Posts: 251
|
No I don't care about letters order.
I just want numbers to be in order, like I, 2, 3, 13. I don't care what letter they have. My column is mix of numbers and letters. I want to sort that column by numbers only. |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
=SMALL(IF(ISTEXT(A1:A7),LEFT(A1:A7,LEN(A1:A7)-1)+0,A1:A7),ROW(A1:A7)) Regards! _________________ Yogi Anand Edit: Deleted inactive web site reference from hard code signature line [ This Message was edited by: Yogi Anand on 2003-01-19 16:28 ] |
|
|
|
|
|
|
#5 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,679
|
Or, just format the selected cells to "text" and then sort.
|
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
{"1";"11B";"12A";"2";"24B"} While sorting with the existing mix of numeric and text data types would produce the desired results for these values... {1,2,"11B","12A","24B"} ...it wouldn't work for... {1,2,"1B","12A","24B"} [ This Message was edited by: Mark W. on 2002-05-17 09:27 ] |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|