bonjour, j'aurai besoin d'aide pour ma fonction recherche , j'aimerai que ma macro recherche dans la colonne A, la reference écrite dans la cellule B2, si elle existe je met la cellule B2 en fond vert si elle n'existe pas je met la cellule en fond blanc, mais ma macro plante si quelqu'un peut m'aider merci.
Dim C As Range
Range("B2").Select
reference = ActiveCell.Value
Columns("A:A").Select
Set C = Selection.Find(What:=reference, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False).Activate
If C Is Nothing Then
Range("B2").Select
ActiveCell.Interior.Color = 2
Else
Range("B2").Select
ActiveCell.Interior.Color = 4
End If
End Sub