- Katılım
- 12 Şubat 2015
- Mesajlar
- 520
- Excel Vers. ve Dili
- Office 2016 TR 64 Bit Windows
- Altın Üyelik Bitiş Tarihi
- 01-02-2027
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Function BubbleSort(Arr As Variant)
Dim Temp As Variant, _
strTemp As Variant, _
i As Long, _
j As Long, _
LngMin As Long, _
lngMax As Long
LngMin = LBound(Arr)
lngMax = UBound(Arr)
For i = LngMin To lngMax - 1
For j = i + 1 To lngMax
If Arr(i) < Arr(j) Then
strTemp = Arr(i)
Arr(i) = Arr(j)
Arr(j) = strTemp
End If
Next j
Next i
BubbleSort = Arr
End Function
Sub YataySirala()
Dim Hcr As Range, _
Sat As Integer, _
Sut As Integer, _
r As Integer, _
c As Integer, _
i As Long, _
j As Integer, _
Ary As Variant
Application.ScreenUpdating = False
If Selection.Count > 1 Then
r = Selection.Rows.Count
c = Selection.Columns.Count
ReDim Ary(c - 1)
For i = 1 To r
For Sut = 1 To c
Ary(Sut - 1) = Selection(i, Sut).Value
Next Sut
BubbleSort Ary
Selection(i, 1).Resize(1, c) = Ary
Next i
End If
Application.ScreenUpdating = True
End Sub