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 help()
dim c as range, plage as range
dim derlig as long
dim Nb1 as long, Nb2 as long, Nb3 as long
with worksheets("Error Report")
Derlig=.range("C65536").end(xlup).row
Set Plage=.range("C1","C" & derlig)
Nb1=0
Nb2=0
Nb3=0
For each c in plage
If c.value= .range("B12").value then 'j'ai pas bien compris si la case est dans la même feuille ou pas donc je te laisse adapter
Nb1=Nb1+1
i=c.row
If cells(i,9).value<>"" then Nb2=Nb2+1
If cells(i,10).value<>"" then Nb3=Nb3+1
end if
next c
end with
MsgBox("Il y a " & Nb1 & " lignes contenant l'erreur présente en B12" & chr(10) & "Il y a eu " & Nb2 & " erreurs ouvertes" & chr(10) & "Il y a eu " & Nb3 & " erreure fermées(résolues)")
end sub |