=CODE(UPPER(A1))-64

 

A1 contains your letter

 

Rajan

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Maries
Sent: Mar/Mon/2012 01:46
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ Replace letters with numbers

 

Hi,

 

Try it,

 

=CONCATENATE(IF(LEN(A1)>=1,CODE(LEFT(A1,1))-64,""),IF(LEN(A1)>=2,CODE(MID(A1
,2,1))-64,""),IF(LEN(A1)>=3,CODE(MID(A1,3,1))-64,""),IF(LEN(A1)>=4,CODE(MID(
A1,4,1))-64,""),IF(LEN(A1)>=5,CODE(MID(A1,5,1))-64,""),IF(LEN(A1)>=6,CODE(MI
D(A1,6,1))-64,""),IF(LEN(A1)>=7,CODE(MID(A1,7,1))-64,""),IF(LEN(A1)>=8,CODE(
MID(A1,8,1))-64,""),IF(LEN(A1)>=9,CODE(MID(A1,9,1))-64,""),IF(LEN(A1)>=10,CO
DE(MID(A1,10,1))-64,""),IF(LEN(A1)>=11,CODE(MID(A1,11,1))-64,""),IF(LEN(A1)>
=12,CODE(MID(A1,12,1))-64,""),IF(LEN(A1)>=13,CODE(MID(A1,13,1))-64,""),IF(LE
N(A1)>=14,CODE(MID(A1,14,1))-64,""),IF(LEN(A1)>=15,CODE(MID(A1,15,1))-64,"")
,IF(LEN(A1)>=16,CODE(MID(A1,16,1))-64,""),IF(LEN(A1)>=17,CODE(MID(A1,17,1))-
64,""),IF(LEN(A1)>=18,CODE(MID(A1,18,1))-64,""),IF(LEN(A1)>=19,CODE(MID(A1,1
9,1))-64,""),IF(LEN(A1)>=20,CODE(MID(A1,20,1))-64,""),IF(LEN(A1)>=21,CODE(MI
D(A1,21,1))-64,""),IF(LEN(A1)>=22,CODE(MID(A1,22,1))-64,""),IF(LEN(A1)>=23,C
ODE(MID(A1,23,1))-64,""),IF(LEN(A1)>=24,CODE(MID(A1,24,1))-64,""),IF(LEN(A1)
>=25,CODE(MID(A1,25,1))-64,""),IF(LEN(A1)>=26,CODE(MID(A1,26,1))-64,""),IF(L
EN(A1)>=27,CODE(MID(A1,27,1))-64,""))

 

Regards,

 

MARIES.

On Mon, Mar 19, 2012 at 12:02 PM, Brian <brianfosterbl...@gmail.com> wrote:

I am using Excel 2007

I have a list of  single letters A to F in column H2 to H26

These letters are are mixed but only one capital letter per cell

I want to go to this list and replace each letter by its numerical value.
So A becomes 1, B becomes 2, C becomes 3 and so on to the letter F

Can you please help with the code.

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com

 

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to