How do I convert text answers to numeric

G

Guest

I want to convert some 'Yes/No' answers into numeric (i.e. Yes=1; No=0).

These will then be inputted into SPSS.

How do you convert text to numeric in Excel?

Thanks in advance
 
D

David McRitchie

If you want to convert them in place with no fuss, you can use a
macro to work off of a selection of cells.

For a worksheet solution you can insert a new column (helper column)
the worksheet below is not case sensitive
=IF(A1="Yes",1,IF(A1="No",0, A1))
or a variation
=IF(LEFT(A1,1)="Y",1,IF(LEFT(A1,1)="N",0, A1))
 
R

Ron Rosenfeld

I want to convert some 'Yes/No' answers into numeric (i.e. Yes=1; No=0).

These will then be inputted into SPSS.

How do you convert text to numeric in Excel?

Thanks in advance

For a formula:

=--(A1="yes")

will give a result of 1 for Yes and 2 for No.


--ron
 
D

Dave Peterson

One more...

Select the range to fix:
edit|Replace
what: Yes
with: 1
replace all

do the similar thing for No.
 

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

Top