Tecnologia, programação e muito Visual FoxPro.

quarta-feira, 28 de outubro de 2009

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

 

maaf; sekali lagi masih mengenai "Diurut"
 
kalau harus pakai makro; VBA-coding-nya kan tidak harus yg mengerikan
cukup yg ringkas-ringas saja...
 
'-------------------
Private Sub CtvBubbleSort(D, Optional ASortOrder As Boolean = True)
   ' --ctv // the Real Sorting applied on an array--
   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()
   ' --ctv // 28 okt 09 --
   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
'-----------------

 
 
----- Original Message -----
From: siti Vi
Sent: Wednesday, October 28, 2009 07:45PM
Subject: Re: ]] XL-mania [[ Re: Diurut

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.

Find helpful tips

for Moderators

on the Yahoo!

Groups team blog.

Yahoo! Groups

Auto Enthusiast Zone

Passionate about cars?

Check out the Auto Enthusiast Zone.

.

__,_._,___

Nenhum comentário:

Arquivo do blog