+ Reply to Thread
Results 1 to 11 of 11

Formula for a letter typed

  1. #1
    Registered User
    Join Date
    03-23-2007
    Posts
    6

    Formula for a letter typed

    I am trying to make a puzzle and use excel to verify I have done it correctly.
    What I want to do is when I type a letter in a specific cell have it put a number value in another cell automatically. For instance, if I type the letter "a" in cell A1 I would like the number 60 to populate automatically in cell B1. I want to give each letter in the alphabet a numeric value so I can type a message in the A column and then auto sum the results of the numbers in the B column. Any help would be greatly appreciated.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    The code function should help

    a small "a" = 97.

    So you could enter the below to return 60

    =CODE(A1)-37

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    03-23-2007
    Posts
    6
    I see that if I put the =CODE(A1)-37 in B1 and then type an "a" in A1, B1 populates with the 60 like I want, but if I type another value in A1, say the letter "d", which for my puzzle = 15 it calculates a 61. Does this make sense what I am trying to do? I want to experiment with my message in column A and see how it affects the results in column B.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    May I suggest you attach a file with the letter and number for your puzzle.

    or maybe just set up your table and do a vlookup

    VBA Noob

  5. #5
    Registered User
    Join Date
    07-27-2006
    MS-Off Ver
    MS Office 2007
    Posts
    79
    Is this what you are trying to do?

    hope it helps
    Attached Files Attached Files
    TL

    https://sites.google.com/site/teelim/
    My page of "not so useful" spreadsheets

  6. #6
    Registered User
    Join Date
    03-23-2007
    Posts
    6
    Thanks for the replies, people. I am attaching my file for you to see. What I am doing is making a puzzle using a polybius square. The numbers given spell a message that hint at solving the puzzle. The puzzle is actually solved by using the numbers given. I need to make a message such that it gives a specific result so I will have to play with the wording. Puzzle is converting the numbers in column "A" to a fraction with the lowest common denominator of 60, then adding them all up and solving for a specific number which is a coordinate to a gps treasure hunt. The top row in my sheet is the values for each letter. The message reads down column "B". It would also be nice to have column "A" filled in for whatever I typed in "B" as well.
    Thanks in advance for looking at this.
    Attached Files Attached Files

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This might help

    VBA Noob
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-23-2007
    Posts
    6
    Holy cow that looks great! I am going to have to look at how you did that. Thanks a bunch!!

  9. #9
    Registered User
    Join Date
    03-23-2007
    Posts
    6
    One question though, when I type the letter i it states to use lowercase only but that is what I typed. If I look at the drop down for the the cell, the I is the only one that is uppercase and it wouldn't bother me just to click it in the drop down but the number in column C isn't pulling over either. There is just a #VALUE! in that cell. Is this because I and J exist in the same cell in the polybius?

  10. #10
    Registered User
    Join Date
    03-23-2007
    Posts
    6
    I believe I figured out the capital I thing. I went to the data validation properties and changed it there. Thanks again for the work!!

  11. #11
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad to see you got it sorted.

    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1