1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Sub TriMC2()
Dim temp(), temp2()
ReDim temp(Range("Nom").Count)
ReDim temp2(Range("Nom").Count)
lig = 0
For i = 1 To Range("Nom").Areas.Count
For j = 1 To Range("Nom").Areas(i).Count
If Range("Nom").Areas(i)(j) <> "" Then
lig = lig + 1
temp(lig) = Range("Nom").Areas(i)(j)
temp2(lig) = Range("Nbr").Areas(i)(j)
End If
Next j
Next i
Call Tri2(temp, temp2, 1, lig)
lig = 0
For i = 1 To Range("Nom").Areas.Count
For j = 1 To Range("Nom").Areas(i).Count
lig = lig + 1
Range("Nom").Areas(i)(j) = temp(lig)
Range("Nbr").Areas(i)(j) = temp2(lig)
Next j
Next i
End Sub |
Partager