Lancer une macro a condition

Salut,

J'ai besoin d'aide :

Alors j'ai un fichier excel qui importe (copier-coller) les données d'un fichier txt vers un fichier xlsm et je veux créer un marco pour chercher un mot : "stab" et lancer marco3 si mot trouvé si non annuler la procédure.

Merci

Bonjour,

voici un exemple,

Sub Macro1()
Set Rng = Cells.Find("stab", LookIn:=xlValues, SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
If Rng Is Nothing Then
    macro3
Else
    MsgBox Rng.Address
End If
End Sub

Sub macro3()
MsgBox "macro3"
End Sub

Merci beaucoup pour votre aide

Rechercher des sujets similaires à "lancer macro condition"