Extraire le mot

Fermé
nur - 7 mai 2013 à 09:07
michel_m Messages postés 16603 Date d'inscription lundi 12 septembre 2005 Statut Contributeur Dernière intervention 16 décembre 2023 - 8 mai 2013 à 08:41
Bonjour,

comment on peut extraire le mot "horizontal" dans une phrase " c'est une machine horizontal" en utilisant macro

merci d'avance


1 réponse

michel_m Messages postés 16603 Date d'inscription lundi 12 septembre 2005 Statut Contributeur Dernière intervention 16 décembre 2023 3 307
8 mai 2013 à 08:41
Bonjour,

Sub demo()
Range("A2").ClearContents
If Range("A1") Like "*horizontal*" Then
     Range("A2") = "horizontal"
Else
     MsgBox " le mot ""horizontal"" ne figure pas dans la cellule A1 "
End If
End Sub

0