Option Explicit
Dim numeroLigne As Integer
Dim i As Integer
Public Sub Extraction()
Application.ScreenUpdating = False
'Calcul du nombre de lignes remplies
numeroLigne = Range("C30000").End(xlUp).Row
'Comparaison ABC et DEF
For i = 2 To numeroLigne
If Cells(i, 3) Like "*1*ABC*" Then
Cells(i, 2) = "1e ABC"
ElseIf Cells(i, 3) Like "*2*ABC*" Then
Cells(i, 2) = "2e ABC"
ElseIf Cells(i, 3) Like "*3*ABC*" Then
Cells(i, 2) = "3e ABC"
ElseIf Cells(i, 3) Like "*4*ABC*" Then
Cells(i, 2) = "4e ABC"
ElseIf Cells(i, 3) Like "*5*ABC*" Then
Cells(i, 2) = "5e ABC"
ElseIf Cells(i, 3) Like "*6*ABC*" Then
Cells(i, 2) = "6e ABC"
ElseIf Cells(i, 3) Like "*10*DEF*" Then
Cells(i, 2) = "10e DEF"
ElseIf Cells(i, 3) Like "*11*DEF*" Then
Cells(i, 2) = "11e DEF"
Else: Cells(i, 2) = "12e DEF"
End If
'Comparaison Groupe 1 et Groupe 2
If Cells(i, 2) Like "*ABC" Then
Cells(i, 1) = "Groupe 1"
Else: Cells(i, 1) = "Groupe 2"
End If
Next
Application.ScreenUpdating = True
End Sub