Bonjour,
une proposition,
Sub Groupe()
Dim G1 As Integer, G2 As Integer, G3 As Integer
Dim i As Integer
With Sheets("test")
dl = .Cells(Rows.Count, 1).End(xlUp).Row
ActiveSheet.Range("$A$1:$B$" & dl).RemoveDuplicates Columns:=Array(1, 2), Header:=xlNo
dl = .Cells(Rows.Count, 1).End(xlUp).Row
OGrp = ""
For x = 2 To dl
Cie = .Cells(x, 1).Value
Select Case Cie
Case 7, 9, 10, 12, 13, 14, 24, 26, 20
NGrp = "1GIS"
Case 1, 2, 8, 11, 15, 17, 22, 23, 19
NGrp = "2GIS"
Case 3, 4, 5, 6, 16, 21, 27, 28, 18
NGrp = "3GIS"
Case Else
NGrp = "1"
End Select
If OGrp = NGrp Then
.Cells(x, 3).Value = ""
Else
.Cells(x, 3).Value = NGrp
OGrp = NGrp
End If
Next
End With
End Sub