Gestion erreur vlookup

une solution sans « worksheetfunction »`Sub recherche()
Dim a As Range
Dim Derlign As Integer
Dim b As Integer, x As Variant

 Derlign = Range("C" & Rows.Count).End(xlUp).Row - 1
 Sheets(2).Range("G2:K22").Name = "base"
 Set a = Range("base")
 Range("G4").Select

 For b = 0 To Derlign
      x = Application.VLookup(ActiveCell.Offset(b, -4), a, 5, 0)     'sans "worksheetfunction"
      If IsError(x) Then
           ActiveCell.Offset(b, 0) = "Pas d’information"
      Else
           ActiveCell.Offset(b, 0) = x
      End If
 Next

End Sub
`

1 « J'aime »