if, then statements and alpha variables

  • Thread starter Thread starter jfav
  • Start date Start date
J

jfav

I want to have Excel return 1 if the value is e and -1 if the value is
w. I can do this with the logical IF statement if the variables are
numbers but it doesn't work if the variables are letters. any
suggestions?
 
An IF should work

=IF(A1="e", 1, IF(A1="w", -1, "A1 is not e or w"))

Dan E
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top