logo-v-light

Our Service

DECIMAL

In this comprehensive guide, we will explore everything you need to know about the DECIMAL function in Excel. The DECIMAL function is a useful tool for converting text representations of numbers in a specific base (radix) into decimal numbers. This function is particularly helpful when working with different numeral systems, such as binary, octal, or hexadecimal.

DECIMAL Syntax

The syntax for the DECIMAL function is as follows:

=DECIMAL(text, radix)

Where:

  • text is the text representation of the number you want to convert to a decimal number. This can be a cell reference, a text string, or a number.
  • radix is the base of the numeral system you are converting from. This can be any integer between 2 and 36, inclusive.

DECIMAL Examples

Let’s look at some examples of how to use the DECIMAL function in Excel:

Example 1: Converting a binary number to decimal

Suppose you have a binary number “1011” and you want to convert it to a decimal number. You can use the DECIMAL function as follows:

=DECIMAL(“1011”, 2)

This formula will return the decimal number 11, as the binary number 1011 is equal to 1 * 2^3 + 0 * 2^2 + 1 * 2^1 + 1 * 2^0 = 11 in decimal.

Example 2: Converting a hexadecimal number to decimal

If you have a hexadecimal number “1A3” and you want to convert it to a decimal number, you can use the DECIMAL function like this:

=DECIMAL(“1A3”, 16)

This formula will return the decimal number 419, as the hexadecimal number 1A3 is equal to 1 * 16^2 + 10 * 16^1 + 3 * 16^0 = 419 in decimal.

Example 3: Converting an octal number to decimal

For an octal number “725”, you can convert it to a decimal number using the DECIMAL function as follows:

=DECIMAL(“725”, 8)

This formula will return the decimal number 469, as the octal number 725 is equal to 7 * 8^2 + 2 * 8^1 + 5 * 8^0 = 469 in decimal.

DECIMAL Tips & Tricks

Here are some tips and tricks to help you get the most out of the DECIMAL function in Excel:

  1. Remember that the radix must be an integer between 2 and 36. If you enter a value outside of this range, Excel will return a #NUM! error.
  2. If the text argument contains characters that are not valid for the specified radix, Excel will return a #VALUE! error. For example, if you try to convert the text “1A3” with a radix of 8, you will get a #VALUE! error because the characters “A” and “B” are not valid in the octal numeral system.
  3. When converting from a numeral system with a base greater than 10, use uppercase letters (A-Z) to represent the additional digits. For example, in the hexadecimal system, the digits 10-15 are represented by the letters A-F.
  4. You can use the DECIMAL function in combination with other functions to perform more complex calculations. For example, you can use the DECIMAL function to convert a binary number to decimal, and then use the SUM function to add it to another decimal number.

Common Mistakes When Using DECIMAL

Here are some common mistakes to avoid when using the DECIMAL function:

  1. Using an invalid radix: Make sure the radix is an integer between 2 and 36. If you enter a value outside of this range, Excel will return a #NUM! error.
  2. Using invalid characters for the specified radix: Ensure that the text argument contains only valid characters for the specified radix. If it contains invalid characters, Excel will return a #VALUE! error.
  3. Forgetting to use uppercase letters for numeral systems with a base greater than 10: When converting from a numeral system with a base greater than 10, use uppercase letters (A-Z) to represent the additional digits.

Why Isn’t My DECIMAL Function Working?

If your DECIMAL function is not working as expected, check for the following issues:

  1. Ensure that the radix is an integer between 2 and 36. If you enter a value outside of this range, Excel will return a #NUM! error.
  2. Check that the text argument contains only valid characters for the specified radix. If it contains invalid characters, Excel will return a #VALUE! error.
  3. Make sure you are using uppercase letters for numeral systems with a base greater than 10. If you use lowercase letters, Excel may return a #VALUE! error.

DECIMAL: Related Formulae

Here are some related formulae that you may find useful when working with the DECIMAL function:

  1. BASE: The BASE function is the inverse of the DECIMAL function. It converts a decimal number to a text representation in a specified base (radix). The syntax for the BASE function is: =BASE(number, radix, [min_length]).
  2. HEX2DEC: The HEX2DEC function converts a hexadecimal number to a decimal number. The syntax for the HEX2DEC function is: =HEX2DEC(number).
  3. DEC2HEX: The DEC2HEX function converts a decimal number to a hexadecimal number. The syntax for the DEC2HEX function is: =DEC2HEX(number, [places]).
  4. HEX2BIN: The HEX2BIN function converts a hexadecimal number to a binary number. The syntax for the HEX2BIN function is: =HEX2BIN(number, [places]).
  5. DEC2BIN: The DEC2BIN function converts a decimal number to a binary number. The syntax for the DEC2BIN function is: =DEC2BIN(number, [places]).

By mastering the DECIMAL function and its related formulae, you can easily work with different numeral systems in Excel and perform a wide range of calculations and conversions.

Related

Did you find this article useful?

Share it with your friends or colleagues

About Aepoch Advisors

We are a boutique accounting and consulting firm servicing international businesses operating in China. We offers book keeping and business advisory service. We also help our clients select and implement SAAS business applications
 
Cloud technology significantly reduces cost foreign companies traditionally spent on tax compliance and ERP systems. Our cloud professionals can help with streamlining your management and controling structure, as well as advising you on how to reduce risks and maximize profits with software purposely built for Chinese business. Contact us today to learn more about our services.