Excel if problem

johnbracey25

New Member
Joined
Jul 11, 2011
Messages
3
Hi guys,

I am trying to turn a list of "yes", "no" into 1,0. I tried the formula =IF(N3 = "no",1,IF(N3= "yes",1,0)) but it didn't work... Can anyone offer up any assistance? Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi John, use:

=IF(N3="no",1,0)

Usually, No/False is 0, and Yes/True is 1, but if yours needs to be the opposite and it works, so be it.
 
Upvote 0
Hi guys,

I am trying to turn a list of "yes", "no" into 1,0. I tried the formula =IF(N3 = "no",1,IF(N3= "yes",1,0)) but it didn't work... Can anyone offer up any assistance? Thanks!
Your formula will return 1 for both Yes and NO.

Assuming the only possible entries are Yes or NO, this formula will return 1 for Yes and 0 for ANYTHING else (except for errors).

=--(N3="yes")
 
Upvote 0
I tried that and it didn't work... really frustrated that such a simple formula isn't working... One thing I didn't mention though... The variables are named "yes" "no" WITH the parentheses already on them...
 
Upvote 0
If your yes and no values actually have quotation marks around them (e.g. "yes" and "no") then try:

=IF(E10="""yes""",1,0)

or

=--(E10="""yes""")
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top