Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    40

    Unanswered: conversion numbers to letters

    Hi,

    i'm have the following data and the field group needs to be converted to a character, the 0 to A , the 1 to B etc. . There unused numbers.

    How can this be achieved ...

    ID group
    818 0
    818 1
    818 2
    818 3
    818 4
    818 5
    818 6
    818 7
    818 8
    818 9
    819 0
    819 1
    819 2
    819 3
    819 4
    819 6

    thanks in advance
    Bye Erwin

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you can convert a number into a character using the CHR$() function
    format is strMyChar=Chr$(intMyNum)

    check the ascii symbol table for details but upper case "A" is ASCII(65)
    so assign 818 0 to be 818 A

    strMyChar = chr$(intMyNum+65)
    where intMyNum is the number you want to convert. note you will need to insert some range checking ie intMyNum in range 0 to 26, if more then devise some strategy to handle this.
    Bear in my some ASCII characters are non printable (below 32 offhand)
    HTH

  3. #3
    Join Date
    Feb 2004
    Posts
    40
    this is working , many thanks
    Bye Erwin

Posting Permissions

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