Bonjour, j'ai fait une boucle dans laquelle j'utilise une recherche de mot. Ma feuille contient 3400 ligne environ. Ma boucle me trouve tout les mots recherchés et copie l'information que j'ai besoin. Mais ma boucle lorsqu'elle a fait les quelques 3400 ligne, recommence au début et cela sans fin. Comment on fait pour que la boucle s'arrête à la première ligne vide? J'ai essayé des chose comme: "Range("A65536").End(xlUp).Offset(1, 0).Select" mais ma boucle ne fonctionne plus.
Voilà mon code:
Sub Macro1()
Dim r As String
Range("a1").Select
Cells.Find(What:="largeur", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
r = Selection.Value
ActiveCell.Offset(0, 1).Select
Selection.Copy
Do while r = "LARGEUR"
Cells.Find(What:="LONGUEUR", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 2).Select
ActiveSheet.Paste
Cells.Find(What:="LARGEUR", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Select
Selection.Copy
Loop
End Sub
J'espère avoir été assez claire dans mes informations. J'ai joint un fichier pour l'exemple.
merci de votre aide.