Formule Excel : "SI" une cellule contient un mot, alors ?

Solved
Tonio5933 Posted messages 4 Status Membre -  
Mike-31 Posted messages 18405 Registration date   Status Contributeur Last intervention   -
Bonjour à toutes et tous,

Je galère depuis plusieurs jours et n'ai trouvé aucune réponse sur les forums.

Voilà le problème:
J'ai en colonne A du texte (par exemple NOM PRENOM)
Je voudrais en colonne B mettre une formule qui me donne un résultat en fonction d'une partie du texte de A.
Exemple: si A1 contient "Fabien" ou "Franck" ou encore d'autres prénoms (environ 10 possibilités), alors ça me renvoie "élève", autrement, rien.

Suis-je assez clair pour que quelqu'un puisse m'aider ?

Merci d'avance pour vos tuyaux

Configuration: Windows / Firefox 54.0

5 answers

Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 141
 
Good evening,

One formula among others

=IF(OR(COUNTIF(A2,"*franck*"),COUNTIF(A2,"*michel*"),COUNTIF(A2,"*fabien*")),"student","") 


It's up to you to add COUNTIF(A2,"*franck*") without forgetting the asterisks
Cheers
Mike-31

I am responsible for what I say, not for what you understand...
47
Tonio5933 Posted messages 4 Status Member
 
Thank you Mike!
I just tested it, and it seems to work.
I'm finishing my formula with everything I need and I'll get back to you if I run into any issues again!

Thanks again
0
Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 141 > Tonio5933 Posted messages 4 Status Member
 
Re,

Okay no problem, anyway if your issue is resolved don't forget to mark the discussion as resolved.
Best regards
1
Bryan
 
Hello,

I need to get a formula:

If in my column A the answer is "NO", then give in column C the value written in a cell in column B.

Thank you all
0
Dilou-31
 
Hello,
I had a similar case. It works perfectly. Thank you very much!
Best regards
0