Forum Discussion
Tie CHENG
Aug 04, 2021Brass Contributor
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?
HansVogelaar
Aug 05, 2021MVP
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)