Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Syntaxe OR

6 réponses
Avatar
Patrice FY
Hello,

J'effectue le test suivant:
If Range("a46") = "toto" or "tata" Or "titi" Then
MsgBox " toto ou titi ou tata"
le test ne fonctionne pas, qu'elle est la syntaxe exact SVP

6 réponses

Avatar
CAP2
Salut, il faut (à ma connaissance) repréciser :

If Range("a46") = "toto" Or Range("a46") ="tata" Or Range("a46") ="titi"
Then
MsgBox " toto ou titi ou tata"
End if

Ca marche ?

CAP2
Avatar
CAP2
Houlà, j'ai pas lu jusqu'au bout ta procédure :
le mieux c'est d'utiliser un Select :

Select Case [A1]
Case "toto"
MsgBox "toto"
Case "titi"
MsgBox "titi"
Case "tutu"
MsgBox "tutu"
End Select

Ca marche ?

CAP2
Avatar
Merci ça marche


-----Message d'origine-----
Salut, il faut (à ma connaissance) repréciser :

If Range("a46") = "toto" Or Range("a46") ="tata" Or Range
("a46") ="titi"

Then
MsgBox " toto ou titi ou tata"
End if

Ca marche ?

CAP2


.



Avatar
AV
Histoire de varier les plaisirs :

If [or(A46="toto",A46="tata",A46="titi")] Then MsgBox "zzzz"

AV
Avatar
docm
C'est une réponse sadique ;)

"AV" wrote in message
news:#
Histoire de varier les plaisirs :

If [or(A46="toto",A46="tata",A46="titi")] Then MsgBox "zzzz"

AV




Avatar
AV
C'est une réponse sadique ;)


Beuh...mais pourquoi donc ?

AV