BASE

Converts a number into text in a specified base (radix), from 2 to 36. Optionally pads the result with leading zeros.

Parameter List

Syntax
BASE(numberradix
[min_length]
)
number

The number to convert. Must be an integer ≥ 0 and < 2^53. For example: 15, A1.

radix

The base for conversion. Must be an integer between 2 and 36. For example: 2, 16, B1.

[optional] min_length

Optional. The minimum length of the returned string. Pads with leading zeros if necessary. Must be ≥ 0. For example: 8, C1.

More details

BASE returns a text string representing the number in the specified base. The base must be between 2 and 36. The optional minimum_length pads the result with leading zeros if needed. If number is negative, BASE returns an error.

Examples

BASE(A1, 16) returns F