Numerical value of character

Christian G.
Christian G. ✭✭✭✭✭✭

Can we extract the numerical value of a character ?

Kind of a "Char^-1 "

Char(112)= p

Char^-1(p)=112 <--- that is what I'm looking for.

Best Answer

  • SolutionSal
    SolutionSal Employee
    Answer ✓

    Hello, there doesn't appear to be a Smartsheet function which does this on it's own. However, you could write your own using INDEX, MATCH and cross sheet references.

    Create a "table sheet" with one column of characters and another column representing their number value. Then in the sheet where you'd like to have the translations done - set up cross sheet references for each of those two columns. Your formula for translating letters to numbers would look something like this:

    INDEX({NumValue}, (MATCH(Value@row, {Char Values}, 0)))

    Hope this helps!

Answers

  • SolutionSal
    SolutionSal Employee
    Answer ✓

    Hello, there doesn't appear to be a Smartsheet function which does this on it's own. However, you could write your own using INDEX, MATCH and cross sheet references.

    Create a "table sheet" with one column of characters and another column representing their number value. Then in the sheet where you'd like to have the translations done - set up cross sheet references for each of those two columns. Your formula for translating letters to numbers would look something like this:

    INDEX({NumValue}, (MATCH(Value@row, {Char Values}, 0)))

    Hope this helps!

  • Christian G.
    Christian G. ✭✭✭✭✭✭
    edited 09/26/22

    I guess that is the way to do it. If Smartsheet does not have the function you want, make it !