IF Statement


Posted by sfarr on January 16, 2002 1:09 PM

I need a formula to evaluate a column's entry (text) and return another value in another cell (text). I tried an if statement that returns #NAME?

Column A contains Sex Type (M/F) and in Column B I want Mr. or Ms. depending on column A. So my formula read: =if((A2='F'), "Ms.", "Mr.")

What am I doing wrong?

Posted by Aladin Akyurek on January 16, 2002 1:15 PM

It's:

=if(A2="F", "Ms.", "Mr.")

F must be between double quotes.

Aladin

Posted by Mark W. on January 16, 2002 1:35 PM

When dealing with an error message it can be
helpful to consult the Help Index Topic for
"Troubleshoot formulas and error values". In
it's section on "What does the error #NAME? mean?"
it lists as a possible cause...

"Entering text in a formula without enclosing the
text in double quotation marks. Microsoft Excel
tries to interpret your entry as a name even
though you intended it to be used as text."



Posted by Mark W. on January 16, 2002 1:42 PM

My posting below was intended as a reply to sfarr (nt)

: