+ Reply to Thread
Results 1 to 11 of 11

Converting text string to number string

  1. #1
    Registered User
    Join Date
    08-31-2010
    Location
    California
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    5

    Converting text string to number string

    I would like to be able to convert any text string into a number string based on the letter's position in the alphabet. The end result I want, for example, is to enter "cab" in the cell and have it return "312." Can someone suggest a formula for me to use? Thanks very much!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting text string to number string

    What would "xyz" convert to?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-31-2010
    Location
    California
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    5

    Re: Converting text string to number string

    It would convert to 242526



    Quote Originally Posted by shg View Post
    What would "xyz" convert to?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting text string to number string

    How would you distinguish that result from from the result of bdbebf?

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Converting text string to number string

    Hi cdworin,

    You need to look at two built-in Excel functions. Char() and Code()
    The Char(65) = A and the Code(A) = 65

    See if these aren't the two functions you need.

  6. #6
    Registered User
    Join Date
    08-31-2010
    Location
    California
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    5

    Re: Converting text string to number string

    Hmmm. Good point. Back to the drawing board. Perhaps automatic insertion of dashes between the numbers.

    Quote Originally Posted by shg View Post
    How would you distinguish that result from from the result of bdbebf?

  7. #7
    Registered User
    Join Date
    08-31-2010
    Location
    California
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    5

    Re: Converting text string to number string

    I think I see how I could use those functions to change a single letter to a number, but how would I use those two functions to convert a text string to a string of numbers?

    Quote Originally Posted by MarvinP View Post
    Hi cdworin,

    You need to look at two built-in Excel functions. Char() and Code()
    The Char(65) = A and the Code(A) = 65

    See if these aren't the two functions you need.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Converting text string to number string

    Hi,
    How about putting each letter in a different cell and then working the formulas?

  9. #9
    Registered User
    Join Date
    08-31-2010
    Location
    California
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    5

    Re: Converting text string to number string

    Marvin,

    Thanks for that suggestion. I've been out of commission for the last couple of weeks and that's why this reply is so delayed. While your suggested approach would probably work, it would be too inefficient for the specific use I have in mind.

    Quote Originally Posted by MarvinP View Post
    Hi,
    How about putting each letter in a different cell and then working the formulas?

  10. #10
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Converting text string to number string

    Heya there forum!
    Long time no speak.
    I'm a little rusty, so this is probably a retarded attempt lol, but here goes anyways.

    See attached file, the yellow rows provide your number outputs. How you want to put them together, I'm not sure....

    -It determines the number of characters in the cell on the left
    -Then outputs each of those characters separately.
    -Refers each individual character to the reference cells listed below (a-z, 1-26)

    -Then outputs the corresponding letter of the alphabet in individual cells.

    I'm kinda pressed for time so I don't have the opportunity to clean this up or be much more thorough in my explanation... I hope it gives you or some of the other nice people on here some ideas.

    And remember...

    mew!
    Attached Files Attached Files
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  11. #11
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Converting text string to number string

    Please Login or Register  to view this content.



+ 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