+ Reply to Thread
Results 1 to 10 of 10

Convert a number to a letter?

  1. #1
    Forum Contributor
    Join Date
    03-07-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    274

    Convert a number to a letter?

    Hello folks,

    Please refer to the following lines of code:

    Please Login or Register  to view this content.
    In the code above I would like that when:

    CapExp_Count = 1, LetterDecoded = "A"
    CapExp_Count = 2, LetterDecoded = "B"
    CapExp_Count = 3, LetterDecoded = "C"
    ...
    CapExp_Count = 10, LetterDecoded = "J"

    etc...

    The above sample does not work. Does anyone know why the above sample wouldn't work as this is a sample I found claiming it would work???

    All help appreciated!

    rn

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,142

    Re: Convert a number to a letter?

    With a number in A2,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    03-07-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    274

    Re: Convert a number to a letter?

    Hi TMS,

    I get:

    Sub or function not defined error ????

    and it highlights the "N" ???

    even if I do this:
    LetterDecoded = CHAR(64)

    I get an error???
    Last edited by RustyNail; 02-01-2019 at 01:51 PM.

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

    Re: Convert a number to a letter?

    Please Login or Register  to view this content.
    From the Immediate window,

    Please Login or Register  to view this content.
    Last edited by shg; 02-01-2019 at 01:59 PM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    03-07-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    274

    Re: Convert a number to a letter?

    Ok, I just want to simplify this....

    So why doesn't the code below work:


    Please Login or Register  to view this content.
    Thank you for your help
    rn

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Convert a number to a letter?

    To load the array in that manner you need
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Fluff13; 02-01-2019 at 02:28 PM.

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Convert a number to a letter?

    How about:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Arkadi; 02-01-2019 at 02:26 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  8. #8
    Forum Contributor
    Join Date
    03-07-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    274

    Re: Convert a number to a letter?

    Ok Guys thank so much ... everything works

    rn

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,142

    Re: Convert a number to a letter?

    You're welcome. Thanks for the rep.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Convert a number to a letter?

    Glad to help & thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Convert Letter to Number then add together
    By d3vious in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-16-2016, 10:26 AM
  2. how to convert letter to number .
    By choy96 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-12-2014, 04:08 AM
  3. vb convert column letter to number
    By jtwork in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-24-2013, 09:43 AM
  4. Convert number into letter, it is possible?
    By Exxcel Noob in forum Excel General
    Replies: 7
    Last Post: 05-02-2012, 05:24 PM
  5. Excel 2007 : Convert a letter to a number
    By CamnJane in forum Excel General
    Replies: 3
    Last Post: 10-25-2011, 10:52 PM
  6. Convert letter to Number
    By gtmeloney in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-23-2009, 11:10 AM
  7. How do I convert a given number into a letter?
    By vortex0001 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-08-2005, 06:05 AM

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