Share via

Reverse of Excel 2013 DECIMAL() Worksheet Function

Anonymous
2015-01-11T18:13:01+00:00

In Excel 2013 there is a function called =DECIMAL(string,base) that returns the decimal value for a character string.  For example

=DECIMAL("FF",16)

will return 255.

Is there a built-in function to do the reverse of this??

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2015-01-11T18:34:16+00:00

Yes

=BASE(255,16)

returns FF

Like Decimal, added in version 2013

--

Regards,

Tom Ogilvy

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2015-01-11T18:52:12+00:00

    Gary's Student,

    Your most welcome.  Have a great day.

    --

    Regards,

    Tom Ogilvy

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-01-11T18:38:01+00:00

    Thanks Tom!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-01-11T18:37:39+00:00

    Thanks Mike!

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-01-11T18:21:48+00:00

    Hi,

    =DEC2HEX(255)

    From Excel help.

    Description

    Converts a decimal number to hexadecimal.

    Syntax

    DEC2HEX(number, [places])

    The DEC2HEX function syntax has the following arguments:

    • Number    Required. The decimal integer you want to convert. If number is negative, places is ignored and DEC2HEX returns a 10-character (40-bit) hexadecimal number in which the most significant bit is the sign bit. The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
    • Places    Optional. The number of characters to use. If places is omitted, DEC2HEX uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).

    Remarks

    • If Number is < -549,755,813,888 or if Number is > 549,755,813,887, DEC2HEX returns the #NUM! error value.
    • If Number is non-numeric, DEC2HEX returns the #VALUE! error value.
    • If the result of DEC2HEX requires more than the number of specified Places characters, it returns the #NUM! error value.

    For example, DEC2HEX(64,1) returns the error value because the result (40) requires two characters.

    • If Places is not an integer, the value of Places is truncated.
    • If Places is non-numeric, DEC2HEX returns the #VALUE! error value.
    • If Places is negative, DEC2HEX returns the #NUM! error value.

    Was this answer helpful?

    0 comments No comments