Sub Vérification()
Dim a, b, ua As Byte, ub As Byte, i&, fin&, c As Range
Dim mes1$, j As Byte, mes2$, mes3$, mes$
a = Array(1, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 31, 35, 36)
b = Array(24, 31)
ua = UBound(a): ub = UBound(b)
i = 3 'ligne du début, à adapter
fin = Cells.Find("*", , xlFormulas, , xlByRows, xlPrevious).Row
1 For i = i To fin
Set c = Cells(i, 21)
If LCase(c) = "bbh" Then _
If MsgBox(c.Address(0, 0) & " contient BBH, supprimer la ligne ?", 4) = 6 _
Then Rows(i).Delete: fin = fin - 1: GoTo 1
Set c = Cells(i, 31)
If LCase(c) = "rst" Then _
If MsgBox(c.Address(0, 0) & " contient RST, supprimer la ligne ?", 4) = 6 _
Then Rows(i).Delete: fin = fin - 1: GoTo 1
Set c = Cells(i, 5)
If Not IsNumeric(c) Or InStr(c, Mid(1.1, 2, 1)) Then _
mes1 = mes1 & vbLf & "- " & c.Address(0, 0)
For j = 0 To ua
If Cells(i, a(j)) = "" And (c = "" Or IsError(Application.Match(a(j), b, 0))) _
Then mes2 = mes2 & vbLf & "- " & Cells(i, a(j)).Address(0, 0)
Next
If c <> "" Then
For j = 0 To ub
If Cells(i, b(j)) <> "" Then _
mes3 = mes3 & vbLf & "- " & Cells(i, b(j)).Address(0, 0)
Next
End If
Next
'---m---
mes = IIf(mes1 = "", "", vbLf & "Ne doit contenir que des chiffres :" & mes1) _
& IIf(mes2 = "", "", vbLf & "Ne doit pas être vide :" & mes2) _
& IIf(mes3 = "", "", vbLf & "Doit être vide :" & mes3)
MsgBox IIf(mes = "", "Aucune erreur", Mid(mes, 2)), , "Erreurs"
End Sub