Adding another condition to VBA code "Case"

Hello everybody,

When I add another condition to the code it gives a fulse result
Case "Buy"

Open in new window

by
Case "Buy", "Achat", "Souscription"

Open in new window

And also
Case "Sell"

Open in new window

by
Case "Sell", "Vente", "Rachat"

Open in new window

it gives a fulse reslut

Thank you for helping me
Adil KhAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
Please share the full statement involved, hard to tell from just one piece of a case statement what the problem is...


»bp
0
Kyle AbrahamsSenior .Net DeveloperCommented:
Could it be case sensitive?  Make sure you're using option compare text.

https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/select-case-statement
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Adil KhAuthor Commented:
The problem was just in the formula I should have add the creteria in the formula Cells "L9" IF(or(E9="Vente";E9="Rachat"...

That was the problem

Thanks for helping
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.