BTC USD 62,528.2 Gold USD 4,328.60
Time now: Jun 1, 12:00 AM

Perlukan bantuan pakar EXCEL carigold..

tok

hasil carian google formula ni memerlukan vba macro.

tapi akan ada error debug. debug bila highlight entire column, kalau highlight cell berkaitan tidak akan debug.

(asalkan boleh guna kira ok laa tuu)..

mula mula highlight column / cell tersebut, pastu run macro.

Public Sub SortContents()
Dim oCell As Range
Dim I As Integer, J As Integer, iLen As Integer
Dim strChr() As String, strWk As String
For Each oCell In Selection
strWk = oCell.Value
iLen = Len(strWk)
ReDim strChr(1 To iLen)
For I = 1 To iLen
strChr(I) = Left(strWk, 1)
strWk = Right(strWk, Len(strWk) - 1)
Next I
For I = 1 To iLen - 1
For J = I + 1 To iLen
If strChr(J) < strChr(I) Then
strWk = strChr(I)
strChr(I) = strChr(J)
strChr(J) = strWk
End If
Next J
Next I
strWk = ""
For I = 1 To iLen
strWk = strWk & strChr(I)
Next I
oCell.Value = strWk
Next oCell
End Sub

ok tok try dulu:)cgrock

maaf memang nak buat dalam cell bukan column:p
 
Back
Top
Log in Register