+ Reply to Thread
Results 1 to 5 of 5

character to integer conversion

  1. #1
    Registered User
    Join Date
    12-07-2005
    Posts
    10

    character to integer conversion

    Is there any way to convert a charatcer into its decimal value in excel VBA?

    E.g. to compare "A" to the number 65 which is its decimal equivalent?

    Thank you!

  2. #2
    Norman Jones
    Guest

    Re: character to integer conversion

    Hi Lithium81,

    MsgBox Asc("A")

    ---
    Regards,
    Norman



    "lithium81" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there any way to convert a charatcer into its decimal value in excel
    > VBA?
    >
    > E.g. to compare "A" to the number 65 which is its decimal equivalent?
    >
    > Thank you!
    >
    >
    > --
    > lithium81
    > ------------------------------------------------------------------------
    > lithium81's Profile:
    > http://www.excelforum.com/member.php...o&userid=29461
    > View this thread: http://www.excelforum.com/showthread...hreadid=520458
    >




  3. #3
    Toppers
    Guest

    RE: character to integer conversion

    A1="A"
    in B1 put =Code(A1)

    or =Code("A")

    "lithium81" wrote:

    >
    > Is there any way to convert a charatcer into its decimal value in excel
    > VBA?
    >
    > E.g. to compare "A" to the number 65 which is its decimal equivalent?
    >
    > Thank you!
    >
    >
    > --
    > lithium81
    > ------------------------------------------------------------------------
    > lithium81's Profile: http://www.excelforum.com/member.php...o&userid=29461
    > View this thread: http://www.excelforum.com/showthread...hreadid=520458
    >
    >


  4. #4
    NickHK
    Guest

    Re: character to integer conversion

    lithium81,
    If on a worksheet, check the CODE and CHAR functions in Excel Help
    If in VBA, then it's ASC and CHR in VBA help.

    NickHK

    "lithium81" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there any way to convert a charatcer into its decimal value in excel
    > VBA?
    >
    > E.g. to compare "A" to the number 65 which is its decimal equivalent?
    >
    > Thank you!
    >
    >
    > --
    > lithium81
    > ------------------------------------------------------------------------
    > lithium81's Profile:

    http://www.excelforum.com/member.php...o&userid=29461
    > View this thread: http://www.excelforum.com/showthread...hreadid=520458
    >




  5. #5
    Registered User
    Join Date
    12-07-2005
    Posts
    10
    Thanks folks! That helps a lot!!

+ 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