Bonjour a tous


J'ai écris ce code, pensez vous qu'il soit possible de l’alléger ? autre question comment gérer les erreurs quand Find ne permet pas de trouver la valeur recherché ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Sub Chercher()
 
Sheets("Feuil2").Activate
 
Set PlageDeRecherche = ActiveSheet.Columns(1)
 
Set Trouve = PlageDeRecherche.Cells.Find(what:="1C13", LookAt:=xlWhole)
Trouve.Select
ActiveCell.Offset(0, 1).Select
C13 = ActiveCell.Value
Range("F1") = C13
 
Set Trouve = PlageDeRecherche.Cells.Find(what:="1RET", LookAt:=xlWhole)
Trouve.Select
ActiveCell.Offset(0, 1).Select
RET = ActiveCell.Value
Range("F2") = RET
 
Set Trouve = PlageDeRecherche.Cells.Find(what:="3VB5", LookAt:=xlWhole)
Trouve.Select
ActiveCell.Offset(0, 1).Select
VB5 = ActiveCell.Value
Range("F3") = VB5
 
 
Sheets("Feuil1").Activate
 
Set PlageDeRecherche = ActiveSheet.Columns(1)
Set Trouve = PlageDeRecherche.Cells.Find(what:="1C13", LookAt:=xlWhole)
Trouve.Select
ActiveCell.Offset(0, 1).Select
ActiveCell = C13
 
 
Set PlageDeRecherche = ActiveSheet.Columns(1)
Set Trouve = PlageDeRecherche.Cells.Find(what:="1RET", LookAt:=xlWhole)
Trouve.Select
ActiveCell.Offset(0, 1).Select
ActiveCell = RET
 
Set PlageDeRecherche = ActiveSheet.Columns(1)
Set Trouve = PlageDeRecherche.Cells.Find(what:="3VB5", LookAt:=xlWhole)
Trouve.Select
ActiveCell.Offset(0, 1).Select
ActiveCell = VB5
 
End Sub
Merciii