Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 159
Default Converting Letter to Numeric Value

I have imported a text file with study participant responses that were coded
A,B,C,D,E. In order to conduct a statistical analysis I need to convert
these to numeric values A=1, etc. I went to the CODE function but this codes
A=65, etc.and only codes one cell at a time. What function or formula is
necessary to code for my desired values and accomplished for the dataset.
Thanks.
--
Larry
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Converting Letter to Numeric Value

Larry

In any cell enter =LOOKUP(B1,{"A","B","C","D","E"}, {1,2,3,4,5})

Adjust B1 to suit.

Can be copied down a column if the column contains letters.

Not case-sensitive.


Gord Dibben MS Excel MVP

On Thu, 19 Jul 2007 15:38:00 -0700, Larry
wrote:

I have imported a text file with study participant responses that were coded
A,B,C,D,E. In order to conduct a statistical analysis I need to convert
these to numeric values A=1, etc. I went to the CODE function but this codes
A=65, etc.and only codes one cell at a time. What function or formula is
necessary to code for my desired values and accomplished for the dataset.
Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Converting Letter to Numeric Value

If you have a range of cells that contain only one of these single letters:
A,B,C,D,E

Select the range of cells in question
Goto the menu EditReplace
Find what: A
Replace with: 1
Replace all

Repeat for the other letters.

--
Biff
Microsoft Excel MVP


"Larry" wrote in message
...
I have imported a text file with study participant responses that were
coded
A,B,C,D,E. In order to conduct a statistical analysis I need to convert
these to numeric values A=1, etc. I went to the CODE function but this
codes
A=65, etc.and only codes one cell at a time. What function or formula is
necessary to code for my desired values and accomplished for the dataset.
Thanks.
--
Larry



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Converting Letter to Numeric Value

Are they in the same cell or do you mean each cell has either A or B or C
etc?
If there are one letter per cell and you want to sum the cells it is easy

=SUMPRODUCT(COUNTIF(A1:A10,{"A";"B";"C";"D";"E"}), {1;2;3;4;5})

will sum A1:A10


--
Regards,

Peo Sjoblom


"Larry" wrote in message
...
I have imported a text file with study participant responses that were
coded
A,B,C,D,E. In order to conduct a statistical analysis I need to convert
these to numeric values A=1, etc. I went to the CODE function but this
codes
A=65, etc.and only codes one cell at a time. What function or formula is
necessary to code for my desired values and accomplished for the dataset.
Thanks.
--
Larry



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Converting Letter to Numeric Value

Just subtract 64 from the value that CODE gives you to yield 1-5 for A-
E. Copy the formula down.

Hope this helps.

Pete

On Jul 19, 11:38 pm, Larry wrote:
I have imported a text file with study participant responses that were coded
A,B,C,D,E. In order to conduct a statistical analysis I need to convert
these to numeric values A=1, etc. I went to the CODE function but this codes
A=65, etc.and only codes one cell at a time. What function or formula is
necessary to code for my desired values and accomplished for the dataset.
Thanks.
--
Larry



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
Converting Letter Grade to Numerical Value Nick Horn Excel Discussion (Misc queries) 3 January 23rd 07 04:38 PM
Formula involving a letter that has to have a numeric value Don Excel Worksheet Functions 4 October 6th 06 09:05 PM
Vlookup using letter and numeric codes LW_Greeney Excel Discussion (Misc queries) 2 May 23rd 06 05:24 PM
How do I assign a numeric value to a text letter Shaun Excel Discussion (Misc queries) 2 September 18th 05 12:24 AM
Converting Letter Grades to Numeric Angelo D Excel Worksheet Functions 6 April 25th 05 07:29 PM


All times are GMT +1. The time now is 12:52 PM.

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"