A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

convert letters to numbers



 
 
Thread Tools Display Modes
  #1  
Old January 26th, 2006, 03:32 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers

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

  #2  
Old January 26th, 2006, 04:34 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers


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

  #3  
Old January 30th, 2006, 11:57 AM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers


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


  #4  
Old January 30th, 2006, 12:00 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers

Tony is it possible to show a working example of the excel code to be
able to convert this process.

Mike

  #5  
Old January 31st, 2006, 08:17 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers


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 Sub


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

  #6  
Old February 1st, 2006, 11:24 AM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers

Tony, thanks for hanging in there, could you now tell me if you please,
how and where i enter this into the speadsheet.

Mike

  #7  
Old February 1st, 2006, 02:11 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers


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

Then from the worksheet window tools - macro - macros select this
macro and run


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

  #8  
Old February 2nd, 2006, 02:49 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers

Tony, thats working a treat, easy when you know how!! Thank you for
your time

Mike

  #9  
Old February 3rd, 2006, 04:01 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers

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

  #10  
Old February 3rd, 2006, 04:33 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default convert letters to numbers


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

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert letters into numbers. i.e. ABCD = 52 Rhapsody 1234 Worksheet Functions 8 December 9th, 2005 07:33 PM
convert negative numbers to positive numbers and vice versa bill gras Worksheet Functions 4 December 7th, 2005 01:39 AM
Adding numbers in columns with letters Arrow General Discussion 2 August 2nd, 2004 05:45 AM
How to convert text to numbers? T Bennett Worksheet Functions 1 November 10th, 2003 09:55 PM
FUNCTION to convert numbers to letters Karen Worksheet Functions 4 September 22nd, 2003 08:14 PM


All times are GMT +1. The time now is 07:48 PM.


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