
The `DECIMAL` function in Excel is used to convert a text representation of a number in a specified base (radix) into a decimal number. This can be particularly useful when dealing with numbers in various numeral systems, such as binary, octal, hexadecimal, etc.
Here’s how you can use the `DECIMAL` function:
Syntax
DECIMAL(text, radix)
- text: The number you want to convert, expressed as text. It should be in the numeral system specified by the `radix`.
- radix: An integer that specifies the base of the number in the `text`. It must be an integer between 2 and 36.
Steps to Use `DECIMAL` Function
- Identify the text number: Ensure the number you want to convert is in text format, such as “1A” for hexadecimal or “101” for binary.
- Determine the base: Understand the base (radix) of the number:
- Binary is base 2
- Octal is base 8
- Decimal is base 10
- Hexadecimal is base 16
- Any base up to 36
- Enter the function in Excel: Use the formula `=DECIMAL(text, radix)`.
Example
Suppose you have a hexadecimal number `1A3F` and you want to convert it to a decimal:
=DECIMAL(A1, 16)
- Place your text number in a cell, for example, A1 = “1A3F”.
- Use the formula in a new cell:
- This formula will convert the hexadecimal number `1A3F` to its decimal equivalent, `6719`.
Additional Tips
- The `text` input in the function must be in quotes if directly typed in the formula, like `=DECIMAL(“1A3F”, 16)`.
- If you input a number with a base 10 or greater, ensure it uses appropriate characters (0-9 and A-Z) suitable for its base.
- If the `text` contains invalid characters for the base specified, or if the `text` is not formatted correctly, Excel will return a `#NUM!` error.
By understanding the `DECIMAL` function, you can easily convert between numeral systems in Excel for better data analysis and processing.