Question : Excel 2007 Changing Text Result From Yes/No To 1's & 0's

Hello,
Hoping someone can assist.  I've attached a sample worksheet which shows text in column A and a formula in column C which simply counts the number of characters and displays the last value.
The format as changed so that instead of a 1 or a 0 after the pipe it reads either Yes or No.  Can someone show me how to change the formula so that if there is a YES at the end of the text in column A, the cell in column C will display 1 or if it's a NO it will display 0?

Thanks!!
Attachments:
 
File Sample
 

Answer : Excel 2007 Changing Text Result From Yes/No To 1's & 0's

If it can only be "YES" or "NO" try

=(RIGHT(A2,3)="Yes")+0

or to take into account "neither of those" and return a blank in that case

=IF(RIGHT(A2,3)="Yes",1,IF(RIGHT(A2,2)="No",0,""))

regards, barry

Random Solutions  
 
programming4us programming4us