IF function

  • Thread starter Thread starter Imani
  • Start date Start date
I

Imani

If I create a function which checks for text in a cell, it gives a #NAME?
error.
I have a sheet with a cell containing the text 'Single'. In another cell I
want to check for that word so I type =if(a1=''Single'', 1,2). Is there
something wrong with that IF, it happens with any text I check for.
 
Perhaps you need to use a semicolon rather than a comma - try it this
way:

=IF(A1="Single";1;2)

Hope this helps.

Pete
 
Imani

I copied your formula from your post onto Excel.

Looks like you have, instead of double quotes, two single
quotes(apostrophes) before and after the string Single

Re-type using double quotes.

If Single is realy 'Single' then

=IF(A!="'Single'",1,2)



Gord Dibben MS Excel MVP
 
Back
Top