PC Review


Reply
Thread Tools Rate Thread

convert letters to numbers

 
 
g75
Guest
Posts: n/a
 
      26th Jan 2006
Whats the quickest way to convert letters to numbers, a = 1, b = 2, c =
3, .....z = 26.
i.e. the cat sat on ............
would look like
20,8,5, 3,1,20, 19,1,20, 15,14,
..................
so my child can convert "secret codes" with her friends.

Prefer the numbers to be displayed above the letter.

I can only think of excel to do this is this possible with Word?

Thanks in advance

Mike

 
Reply With Quote
 
 
 
 
tony h
Guest
Posts: n/a
 
      26th Jan 2006

You can do it either in Excel or word. Getting the letter values is
relatively easy using a for next loop, mid and asc functions. more
difficult is the layout. one easyish thought is to put them as
superscripts in word.

I hope you don't take offence at this but I think you are missing the
point. Which is to learn the conversions and be able to read and write
such secret codes without the aid of a computer. A couple of hours work
and she should know them all throughly. It is what mine did at 5 and 6.
Start by learning all the vowels and every 5th letter of the alphabet.


regards


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=505341

 
Reply With Quote
 
g75
Guest
Posts: n/a
 
      30th Jan 2006

tony h wrote:
> You can do it either in Excel or word. Getting the letter values is
> relatively easy using a for next loop, mid and asc functions. more
> difficult is the layout. one easyish thought is to put them as
> superscripts in word.
>
> I hope you don't take offence at this but I think you are missing the
> point. Which is to learn the conversions and be able to read and write
> such secret codes without the aid of a computer. A couple of hours work
> and she should know them all throughly. It is what mine did at 5 and 6.
> Start by learning all the vowels and every 5th letter of the alphabet.
>
>
> regards
>
>
> --
> tony h
> ------------------------------------------------------------------------
> tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
> View this thread: http://www.excelforum.com/showthread...hreadid=505341


 
Reply With Quote
 
g75
Guest
Posts: n/a
 
      30th Jan 2006
Tony is it possible to show a working example of the excel code to be
able to convert this process.

Mike

 
Reply With Quote
 
tony h
Guest
Posts: n/a
 
      31st Jan 2006

Sub a()
Dim str As String
Dim strA As String
Dim i As Integer
Dim rng As Range

str = LCase(InputBox("enter words"))
If str <> "" Then
Set rng = Worksheets(1).Range("A1")
For i = 1 To Len(str)
strA = Mid(str, i, 1)
rng = Asc(strA) + 1 - Asc("a")
rng.Offset(1) = strA
Set rng = rng.Offset(, 1)
Next
End If
MsgBox "done"

End Su

--
tony
-----------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=50534

 
Reply With Quote
 
g75
Guest
Posts: n/a
 
      1st Feb 2006
Tony, thanks for hanging in there, could you now tell me if you please,
how and where i enter this into the speadsheet.

Mike

 
Reply With Quote
 
tony h
Guest
Posts: n/a
 
      1st Feb 2006

tools - macros - vba
Insert - Module
paste code in the module window

Then from the worksheet window tools - macro - macros <select thi
macro> and ru

--
tony
-----------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=50534

 
Reply With Quote
 
g75
Guest
Posts: n/a
 
      2nd Feb 2006
Tony, thats working a treat, easy when you know how!! Thank you for
your time

Mike

 
Reply With Quote
 
g75
Guest
Posts: n/a
 
      3rd Feb 2006
Tony, could you possilbly show me how to do this in Word

PS my 4 year old is impressed with the conversion but she does not like
excel

 
Reply With Quote
 
tony h
Guest
Posts: n/a
 
      3rd Feb 2006

I suggest you look for help on this in a Word forum.

Regards


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=505341

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert letters to numbers JT Microsoft Excel Programming 3 3rd Jun 2010 07:00 PM
Convert numbers to letters in excel alias Microsoft Excel Worksheet Functions 1 25th Mar 2009 02:02 PM
Convert Letters to Numbers? DS Microsoft Excel Programming 8 21st Oct 2008 05:57 PM
How to convert numbers to corresponding letters? Ex: 123 to abc =?Utf-8?B?anBsYXpvbGE=?= Microsoft Excel Misc 4 29th Jun 2005 10:29 AM
How to convert numbers to letters =?Utf-8?B?Q2xhdWRpbyBNaWxsYXBlbA==?= Microsoft Excel Misc 1 23rd May 2004 10:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:39 AM.