Mungkin begini..
Pada masing header sepertinya harus dibuat ractangle (manual aja), Caranya:
klik kanan pada cell dimana header itu berada lalu pada pojok kanan
atas ada name box
kemudian ganti "name box B2" dengan "Contoh" lalu enter. ulangi lagi
untuk masing2 header
Setelah itu assign macro pada rectangle tadi dengan klik kanan pada
cell B1 misalnya
di vbe-nya : Makroh dipanggil dengan application.
Option Explicit
Sub ClickToSort(
Dim MyDat As Range, ColStart As Long, SortOrder As Long
Dim FRow As Long, TRow As Long, LRow As Long, iCol As Integer,
strCol As String
Dim Rng1 As Range, Rng2 As Range
TRow = 2
iCol = 3
strCol = "B"
With ActiveSheet
LRow = .Cells(.Rows.
Set Rng1 = .Range(.Cells(
Set Rng2 = Nothing
On Error Resume Next
With Rng1
Set Rng2 = .Offset(1, 0).Resize(.Rows.
1).SpecialCells(
End With
On Error GoTo 0
FRow = Rng2(1).Row
ColStart = .Shapes(Application
Set MyDat = .Range("B" & TRow & ":B" & LRow).Resize(
If .Cells(FRow, ColStart).Value < .Cells(LRow, ColStart).Value Then
SortOrder = xlDescending
Else
SortOrder = xlAscending
End If
MyDat.Sort key1:=.Cells(
End With
End Sub
hope this help..
| Ada lowongan jadi direktur ga? Hubungi momods please... :D |
| 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 |
+-------------------------------------------------------------------+
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Nenhum comentário:
Postar um comentário