Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi folks,
Am using Excel 2003... in my cell A1, i typed the following using Alt +Enter Orange Apple Pear Banana How can I sort them (they all inside 1 single cell)? Thanks a lot. cheers:) |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Found this routine in one of these news groups. Neglected to attribute at the
time to originator. Sub SortCell() 'Sorting cell contents 'You can use the split command to convert the content to an array, then sort 'the array, use the join command to recreate, then place it back in the cell. Dim i As Long, J As Long Dim swap1, swap2 Dim varr varr = Split(ActiveCell, Chr(10)) 'change delimiter if necessary ' peform bubble sort For i = 0 To UBound(varr) - 1 For J = i + 1 To UBound(varr) varr(i) = Trim(varr(i)) varr(J) = Trim(varr(J)) If varr(i) varr(J) Then swap1 = varr(i) swap2 = varr(J) varr(J) = swap1 varr(i) = swap2 End If Next J Next i ActiveCell.Value = Application.Trim( _ Join(varr, " ")) End Sub Gord Dibben MS Excel MVP On Tue, 21 Aug 2007 09:02:30 -0700, " wrote: Hi folks, Am using Excel 2003... in my cell A1, i typed the following using Alt +Enter Orange Apple Pear Banana How can I sort them (they all inside 1 single cell)? Thanks a lot. cheers:) |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
You can only sort cells but nor cells that have paragraph mark within a cell. Challa Prabhu " wrote: Hi folks, Am using Excel 2003... in my cell A1, i typed the following using Alt +Enter Orange Apple Pear Banana How can I sort them (they all inside 1 single cell)? Thanks a lot. cheers:) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Ascending Sort formula, change to neg #: descending sort.. | Excel Discussion (Misc queries) | |||
How to sort out (ascending or descending) automatically a list | Excel Worksheet Functions | |||
Excel worksheets needs to sort ascending or descending order. | Excel Worksheet Functions | |||
Sort other than by alphabetical ascending/ descending | Excel Discussion (Misc queries) | |||
how can I hide sort ascending and sort descending options in the . | Excel Discussion (Misc queries) |