Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tonny
 
Posts: n/a
Default How do I convert text answers to numeric

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
  #2   Report Post  
David McRitchie
 
Posts: n/a
Default

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))

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Tonny" wrote in message ...
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



  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 29 Sep 2005 02:56:02 -0700, "Tonny"
wrote:

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
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

One more...

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

do the similar thing for No.

Tonny wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Convert excel file to flat text file Gary's Student Excel Discussion (Misc queries) 0 June 1st 05 12:17 AM
convert a number in Excel from numeric to text, i.e. "1" to "one" buenavisionpaul Excel Worksheet Functions 1 January 27th 05 06:30 PM
How do I convert dollars and cents to text, and prefill the cell . Jan Buckley Excel Worksheet Functions 1 January 20th 05 07:22 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM


All times are GMT +1. The time now is 10:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"