Sub CompteNode()
Dim j As Integer
Dim cpt, occ, x, nblignes, nbocc As Long
Range('A:A'Â'Â').Select
Selection.Sort Key1:=Range('A1'Â'Â'), Order1:=xlAscending
' Comptage du nombre d'occurences
Range('A1'Â'Â').Select
nblignes = Cells(Range('A:A'Â'Â').Count, ActiveCell.Column).End(xlUp).Row
x = 1
j = 2
cpt = nblignes
Range('D1'Â'Â').Value = 'Node'
Range('E1'Â'Â').Value = 'Nombre'
While cpt > 0
occ = Range('A' & x).Value
nbocc = Application.CountIf(Range('A:A'Â'Â'), occ)
Range('D' & j).Value = occ
Range('E' & j).Value = nbocc
j = j + 1
x = x + nbocc
cpt = cpt - nbocc
Wend
End Sub
Sub CompteNodeB()
' de la colonne B
Dim j As Integer
Dim cpt, occ, x, nblignes, nbocc As Long
Range('B:B').Select
Selection.Sort Key1:=Range('B1'), Order1:=xlAscending
' Comptage du nombre d'occurences
Range('B1').Select
nblignes = Cells(Range('B:B').Count, ActiveCell.Column).End(xlUp).Row
x = 1
j = 2
cpt = nblignes
Range('F1').Value = 'Node'
Range('G1').Value = 'Nombre'
While cpt > 0
occ = Range('B' & x).Value
nbocc = Application.CountIf(Range('B:B'), occ)
Range('F' & j).Value = occ
Range('G' & j).Value = nbocc
j = j + 1
x = x + nbocc
cpt = cpt - nbocc
Wend
End Sub