Macro "commence par"

Résolu
allias -  
 allias -
Bonjour,

J'ai un problème d'écriture de macro : si je fais cette macro ça marche

If Application.Workbooks("xxxx.xls").Worksheets("Feuil1").Range("A" & i).Value = "toto" Then ...

mais je voudrais la modifier et que ce ne soit plus la cellule = toto mais commence par toto.

Est-ce que quelqu'un peut m'aider?
Merci

2 réponses

tompols Messages postés 1273 Date d'inscription   Statut Contributeur Dernière intervention   435
 
salut,
commence par : If left(Application.Workbooks("xxxx.xls").Worksheets("Feuil1").Range("A" & i).Value,4) = "toto" Then
tant qu'on y est pour contient "toto" : if instr(Application.Workbooks("xxxx.xls").Worksheets("Feuil1").Range("A" & i).Value, "toto") then....
0
allias
 
Ca marche, merci!
0