Forum Discussion

Tie CHENG's avatar
Tie CHENG
Brass Contributor
Aug 04, 2021
Solved

Is it possible to enter an octal number or hex number in a formula?

It seems that it is possible in VBA. For instance, we could have `MsgBox (&O11)` which pops up 9.

 

But I could not enter well that in a formula.

 

Does anyone know if it is possible?

  • Tie CHENG 

    In a formula in a cell, you can use the OCT2DEC and HEX2DEC functions, for example:

     

    =OCT2DEC(11) returns 9

    =HEX2DEC("1A") returns 26

     

    (If the hexadecimal value contains letters A to F, you must enclose it in quotes)

1 Reply

  • Tie CHENG 

    In a formula in a cell, you can use the OCT2DEC and HEX2DEC functions, for example:

     

    =OCT2DEC(11) returns 9

    =HEX2DEC("1A") returns 26

     

    (If the hexadecimal value contains letters A to F, you must enclose it in quotes)