Bu konu hakkında İnsan Tank Beyin forumda göndermiş olduğu bir kod vardı. Fakat bu bir dütun için geçerliydi. Ben ekte sunduğum dosyada bu sıralamanın B ve C sütununa göre yapılmasını istiyorum.
İhsan Bey in yapmış Forumda vermiş olduğu kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B2:CD" & Cells(65536, "B").End(xlUp).Row)) Is Nothing Then Exit Sub
On Error Resume Next
If Target.Column = 81 Then
Range("B2:CD" & Cells(65536, "B").End(xlUp).Row).Sort key1:=Range("B2"), key2:=Range("F2")
End If
End Sub
İhsan Bey in yapmış Forumda vermiş olduğu kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B2:CD" & Cells(65536, "B").End(xlUp).Row)) Is Nothing Then Exit Sub
On Error Resume Next
If Target.Column = 81 Then
Range("B2:CD" & Cells(65536, "B").End(xlUp).Row).Sort key1:=Range("B2"), key2:=Range("F2")
End If
End Sub
Ekli dosyalar
Son düzenleme:
