Excel functions / Math
BASE function
Writes a number in another base, such as binary (2) or hexadecimal (16), as text.
Syntax
=BASE(number, radix, [min_length])
Arguments
number: A whole number, 0 or more.radix: The base, from 2 to 36.min_length(optional): Pad with zeros on the left to at least this many digits.
When to use it
BASE writes a whole number in any base from 2 to 36, as text. It covers what DEC2BIN and DEC2HEX do and more, without their size limits.
Examples
A number in base 36, as short codes use
A B C 1 Number 2 123456 2N9C In C2:
=BASE(A2, 36)→ 2N9CBinary, padded to eight digits
A B C 1 Number 2 5 00000101 In C2:
=BASE(A2, 2, 8)→ 00000101
Common mistakes
- Negative numbers. BASE takes only numbers of 0 and above.
BASE in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: BASE
- Danish: BASIS
- Dutch: BASIS
- Finnish: PERUS
- French: BASE
- German: BASIS
- Hungarian: ALAP
- Italian: BASE
- Norwegian: GRUNNTALL
- Polish: PODSTAWA
- Portuguese (Brazil): BASE
- Portuguese (Portugal): BASE
- Russian: ОСНОВАНИЕ
- Spanish: BASE
- Swedish: BAS
- Turkish: TABAN