Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default convert text string to a number code

I need to convert a list of text values and assign a number code
example:
Text Value Code
A- 7
A 6
A+ 5
AA- 4
AA 3
AA+ 2
AAA 1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default convert text string to a number code

=8-MATCH(A1,{"A-","A","A+","AA-","AA","AA+","AAA"},0)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ramon" wrote in message
...
I need to convert a list of text values and assign a number code
example:
Text Value Code
A- 7
A 6
A+ 5
AA- 4
AA 3
AA+ 2
AAA 1



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default convert text string to a number code

Assuming your text/code table is in columns A & B (A2:B8)and C2 contains
value to be converted:

=VLOOKUP(C2,$A$2:$B$8,2,0)

"ramon" wrote:

I need to convert a list of text values and assign a number code
example:
Text Value Code
A- 7
A 6
A+ 5
AA- 4
AA 3
AA+ 2
AAA 1

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default convert text string to a number code

Thank you for the response Bob.
I am not sure how to use that formula, probably because I did not provide
enough detail for my query.
I am trying to create a table that will asssign a numeric value to a list of
characters.

In my example below, I am trying to assign a value of 7 to the alpha value
A- whenever it encounters it in a column of the spreadsheet (let's say column
C ), next I want to assign a value of 6 to the alpha value A whenever it
encounters it in column C ...and so on..
So I want to end up with each occurrence of the alpha value with an assigned
numeric code.
How would the formula be used? and Where would it be placed when using
multiple spreadsheets.? I supposed the value table will be on one spreadsheet
and the formula will be in the column next to where the data spreadsheet.
Thank you again for your help.



"Bob Phillips" wrote:

=8-MATCH(A1,{"A-","A","A+","AA-","AA","AA+","AAA"},0)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ramon" wrote in message
...
I need to convert a list of text values and assign a number code
example:
Text Value Code
A- 7
A 6
A+ 5
AA- 4
AA 3
AA+ 2
AAA 1




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default convert text string to a number code

If the alpha value is in A1, put the formula in B1, and see what happens.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ramon" wrote in message
...
Thank you for the response Bob.
I am not sure how to use that formula, probably because I did not provide
enough detail for my query.
I am trying to create a table that will asssign a numeric value to a list
of
characters.

In my example below, I am trying to assign a value of 7 to the alpha value
A- whenever it encounters it in a column of the spreadsheet (let's say
column
C ), next I want to assign a value of 6 to the alpha value A whenever it
encounters it in column C ...and so on..
So I want to end up with each occurrence of the alpha value with an
assigned
numeric code.
How would the formula be used? and Where would it be placed when using
multiple spreadsheets.? I supposed the value table will be on one
spreadsheet
and the formula will be in the column next to where the data spreadsheet.
Thank you again for your help.



"Bob Phillips" wrote:

=8-MATCH(A1,{"A-","A","A+","AA-","AA","AA+","AAA"},0)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"ramon" wrote in message
...
I need to convert a list of text values and assign a number code
example:
Text Value Code
A- 7
A 6
A+ 5
AA- 4
AA 3
AA+ 2
AAA 1








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default convert text string to a number code

Thank you Bob ...

"Bob Phillips" wrote:

If the alpha value is in A1, put the formula in B1, and see what happens.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ramon" wrote in message
...
Thank you for the response Bob.
I am not sure how to use that formula, probably because I did not provide
enough detail for my query.
I am trying to create a table that will asssign a numeric value to a list
of
characters.

In my example below, I am trying to assign a value of 7 to the alpha value
A- whenever it encounters it in a column of the spreadsheet (let's say
column
C ), next I want to assign a value of 6 to the alpha value A whenever it
encounters it in column C ...and so on..
So I want to end up with each occurrence of the alpha value with an
assigned
numeric code.
How would the formula be used? and Where would it be placed when using
multiple spreadsheets.? I supposed the value table will be on one
spreadsheet
and the formula will be in the column next to where the data spreadsheet.
Thank you again for your help.



"Bob Phillips" wrote:

=8-MATCH(A1,{"A-","A","A+","AA-","AA","AA+","AAA"},0)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"ramon" wrote in message
...
I need to convert a list of text values and assign a number code
example:
Text Value Code
A- 7
A 6
A+ 5
AA- 4
AA 3
AA+ 2
AAA 1







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
Convert a Number Code to a Text Code Traye Excel Discussion (Misc queries) 3 April 6th 07 09:54 PM
Convert a number to a name string Numbers to name string Excel Worksheet Functions 2 June 23rd 06 04:52 PM
Convert text strings to a code or number MaxNY23 Excel Worksheet Functions 15 March 23rd 06 10:47 PM
How to COnvert text string to number timtak Excel Discussion (Misc queries) 3 June 4th 05 04:57 AM
convert string to number Christina Excel Worksheet Functions 3 November 16th 04 02:36 PM


All times are GMT +1. The time now is 06:01 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"