- Katılım
- 3 Mart 2006
- Mesajlar
- 99
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row <> 1 Then Exit Sub
If Target.Column = 1 Then Exit Sub
With Sheets("Sayfa2")
.[A2:c13].Clear
.[A2:c13] = WorksheetFunction.Transpose(Sheets("Sayfa1").[c1:n3])
.[A2:c13].Sort key1:=.Cells(2, Target.Column)
End With
End Sub
Sub test()
With Sheets("Sayfa2")
.[A2:c13].Clear
.[A2:c13] = WorksheetFunction.Transpose(Sheets("Sayfa1").[c1:n3])
For j = 2 To 3
For i = 2 To 13
If .Cells(i, j) = 0 Then .Cells(i, j) = ""
Next
.[A2:c13].Sort key1:=.Cells(2, j), Order1:=xlAscending
Sayfa1.Cells(j, "o") = .Cells(2, j)
Sayfa1.Cells(j, "q") = .Cells(3, j)
Sayfa1.Cells(j, "s") = .Cells(4, j)
Sayfa1.Cells(j, "p") = .[a2]
Sayfa1.Cells(j, "r") = .[a3]
Sayfa1.Cells(j, "t") = .[a4]
.[A2:c13].Sort key1:=.Cells(2, j), Order1:=xlDescending
Sayfa1.Cells(j, "u") = .Cells(2, j)
Sayfa1.Cells(j, "v") = .Cells(3, j)
Sayfa1.Cells(j, "w") = .Cells(4, j)
MsgBox "İşlem tamam"
Next
End With
End Sub
Bu şekilde deneyin.
Kod:Sub test() With Sheets("Sayfa2") .[A2:c13].Clear .[A2:c13] = WorksheetFunction.Transpose(Sheets("Sayfa1").[c1:n3]) For j = 2 To 3 For i = 2 To 13 If .Cells(i, j) = 0 Then .Cells(i, j) = "" Next .[A2:c13].Sort key1:=.Cells(2, j), Order1:=xlAscending Sayfa1.Cells(j, "o") = .Cells(2, j) Sayfa1.Cells(j, "q") = .Cells(3, j) Sayfa1.Cells(j, "s") = .Cells(4, j) Sayfa1.Cells(j, "p") = .[a2] Sayfa1.Cells(j, "r") = .[a3] Sayfa1.Cells(j, "t") = .[a4] .[A2:c13].Sort key1:=.Cells(2, j), Order1:=xlDescending Sayfa1.Cells(j, "u") = .Cells(2, j) Sayfa1.Cells(j, "v") = .Cells(3, j) Sayfa1.Cells(j, "w") = .Cells(4, j) MsgBox "İşlem tamam" Next End With End Sub
Sub test()
son = Sayfa1.[b65536].End(3).Row
With Sheets("Sayfa2")
.Range("A2:c" & son).Clear
.Range("A2:c" & son) = WorksheetFunction.Transpose(Sheets("Sayfa1").Range("c1:n" & son))
For j = 2 To son
For i = 2 To 13
If .Cells(i, j) = 0 Then .Cells(i, j) = ""
Next
.Range("A2:c" & son).Sort key1:=.Cells(2, j), Order1:=xlAscending
Sayfa1.Cells(j, "o") = .Cells(2, j)
Sayfa1.Cells(j, "q") = .Cells(3, j)
Sayfa1.Cells(j, "s") = .Cells(4, j)
Sayfa1.Cells(j, "p") = .[a2]
Sayfa1.Cells(j, "r") = .[a3]
Sayfa1.Cells(j, "t") = .[a4]
.Range("A2:c" & son).Sort key1:=.Cells(2, j), Order1:=xlDescending
Sayfa1.Cells(j, "u") = .Cells(2, j)
Sayfa1.Cells(j, "v") = .Cells(3, j)
Sayfa1.Cells(j, "w") = .Cells(4, j)
MsgBox "İşlem tamam"
Next
End With
End Sub