Tecnologia, programação e muito Visual FoxPro.

quarta-feira, 28 de outubro de 2009

Re: ]] XL-mania [[ Re: Diurut

 

maaf, masih mengenai "Diurut"
jika dikehendaki haaaaarus dengan makro..
makronya kan tidak harus yg :mengerikan"
cukup yg ringkas-ringkas saja:

.-----------------
Private Sub CtvBubbleSort(D, Optional ASortOrder As Boolean = True)
   Dim i As Long, j As Long, n As Long, k As Long
   Dim X, Y, tTip, LogicTest As Boolean
   n = UBound(D)
   For i = 1 To n - 1
      For k = n To (i + 1) Step -1
         j = k - 1
         X = CInt(Mid(D(k), 12, Len(D(k)) - 11))
         Y = CInt(Mid(D(j), 12, Len(D(j)) - 11))
         LogicTest = IIf(ASortOrder, X < Y, X > Y)
         If LogicTest Then
            tTip = D(k): D(k) = D(j): D(j) = tTip
         End If
      Next k
   Next i
End Sub

Sub Special_Sort()
   Dim dRange As Range, dArr(), i As Long, n As Long
   Set dRange = Application.InputBox(Prompt:="Tunjuk Range yg akan sort", _
   Title:="Special Sorting", Default:=Selection.Address, Type:=8)
   n = dRange.Cells.Count: ReDim dArr(1 To n)
   For i = 1 To n: dArr(i) = dRange(i): Next
   Call CtvBubbleSort(dArr, True)
   For i = 1 To n: dRange(i, 3) = dArr(i): Next i
   Call CtvBubbleSort(dArr, False)
   For i = 1 To n: dRange(i, 5) = dArr(i): Next i
End Sub
'-------------------------



2009/10/28 siti Vi <setiyowati.devi@gmail.com>
Terima kasih pak J4jaNk....
 
Kalau gitu...
misal dikehendaki sorting dengan ARRAY formula
salah satu caranya spt ini
 
sort - ascending:
=INDEX(B3:B22,RIGHT(TEXT(SMALL(--SUBSTITUTE(LEFT(B3:B22,11)&
  RIGHT("000"&MID(B3:B22,12,3),3),".","")+ROW(1:20)/100,ROW(1:20)),"0.000"),3)/10)
 
sort - descending 
(SMALL diganti LARGE )
 
rumus tsb sudah mengantisipasi jika data : 11 karakter pertama
tidak harus seragam seperti contoh yg ada
 
 
=======
----- Original Message -----
From: { J 4 j a N k }
To: XL-mania@yahoogroups.com
Sent: Wednesday, October 28, 2009 02:30PM
Subject: ]] XL-mania [[ Re: Diurut
 
Mohon maaf hasil yang diinginkan adalah :
 192.168.11.1 
 192.168.11.12 
 192.168.11.15 
 192.168.11.100 
 192.168.11.110 
 192.168.11.139 
 192.168.11.141 
 192.168.11.144 
 192.168.11.145 
 192.168.11.146 
 192.168.11.148 
 192.168.11.149 
 192.168.11.150 
 192.168.11.151 
 192.168.11.152 
 192.168.11.153 
 192.168.11.154 
 192.168.11.155 
 192.168.11.156 
 192.168.11.157 
dan sebaliknya
 
Thanks,
J@j@nk

__._,_.___
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| Moderasi akan lambat minggu ini, momods pergi ke tempat jauh      |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf          |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message,  melecehkan,  tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan  winzip  jika  perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke  |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/           |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau...  |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html           |
+-------------------------------------------------------------------+
| Message lama ada di :                                             |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]  |
| http://www.mail-archive.com/xl-mania@yahoogroups.com              |
+-------------------------------------------------------------------+
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Y! Groups blog

The place to go

to stay informed

on Groups news!

Yahoo! Groups

Mom Power

Just for moms

Join the discussion

.

__,_._,___

Nenhum comentário:

Arquivo do blog