On Feb 14, 1:13 pm, Mike H <Mi...@discussions.microsoft.com> wrote:
> Hi,
>
> This will sort A1 into A2
>
> Sub gg()
> x = Len(Cells(1, 1))
> Cells(2, 1).ClearContents
> For i = 1 To x
> Cells(i, 2) = Mid(Cells(1, 1), i, 1)
> Next i
> Cells(1, 2).Resize(x).Sort Key1:=Cells(1, 2), Order1:=xlAscending, _
> Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
> For i = 1 To x
> Cells(2, 1) = Cells(2, 1) & Cells(i, 2)
> Cells(i, 2).ClearContents
> Next i
> End Sub
>
> Mike
>
> "hiflyinski...@gmail.com" wrote:
> > if i have a list of letters in a cell, is it possible to alphabetize
> > them?
>
> > example: ADCB --> ABCD
Is there a way that this can work in any cell, first of all.
second, can it Change ABaD --> AaBD and not ABDa.
third, can it output to the same cell as the input
if not, could it go to an identical position (ex: D7) on a different
worksheet
|