Excel IF Formula with Text Format

virg1980 -  
Raymond PENTIER Posted messages 58546 Registration date   Status Contributeur Last intervention   -
Hello,
I created an Excel file and I would like some data to fill automatically based on what has been entered previously. For this, I thought of using the IF logical formula, but I can't apply it to cells containing text.
A formula like =IF(A1="congé","1")

To clarify, here is my file and my formula where the NAME is currently located:
http://www.cijoint.fr/cjlink.php?file=cj200808%2FcijEDVLnYh.xls

Thank you for your help.

3 réponses

le hollandais volant Posted messages 5294 Status Membre 1 059
 
=IF(A1="congé";1;0) 

You need to put "" around the words and not around the numeric values. To use IF: you need to set the test: A1="Congé", then the value to put if the test is true: so 1, and also the value to put if the test is false: 0.
31
Coolfecamp
 
Thank you very much for your help

perfect
1
MM91
 
Finally, 2 very good clarifications for the use of the "IF" function applied to texts.

Many thanks to "the Dutchman" and "gbinforme"


MM91
1