DEV Community

Andrews
Andrews

Posted on • Originally published at geekexcel.com on

Decimal to Octal How to Use DEC2OCT Function in Excel 365? – (With Examples)

DEC2OCT Function in Excel:

In this tutorial, we will guide you to learn how to use DEC2OCT Function in Excel 365 with its syntax, definition, and examples. Let’s see them one by one. Get official version of MS Excel from the following link: https://www.microsoft.com/en-in/microsoft-365/excel

Jump To:

DEC2OCT – Function Definition:

  • This function converts a decimal number to octal value.
  • DEC2OCT Function is just opposite to OCT2DEC Function.

Syntax:

=DEC2OCT(number, [places])

*Number * – The decimal number that you want to convert as an octal number.

Places – It is optional. It is used for padding the output value with leading zeros. If you don’t mention the places, it returns the exact value of the input.

Note:

  • If places is non-numeric, it returns #VALUE! Error.
  • If the decimal number is less than -536,870,912 or greater than 536,870,911, it will show #NUM! Error value.
  • If you give a negative number to the places, it returns #NUM! Error.

Examples:

Here we come up with examples to make you understand this concept.

Example 1:

  • In the following image, you can see the input decimal value in the cell A2 and its places is mentioned in cell B2.
  • The converted octal number is placed in the cell C2.

Decimal to Octal Conversion
Decimal to Octal Conversion

Example 2:

  • If places is non-numeric, it returns #VALUE! Error.

Example 2
Example 2

Example 3:

  • If the decimal number is less than -536,870,912 or greater than 536,870,911, it will show #NUM! Error value.
  • If you give a negative number to the places, it returns #NUM! Error.

Example 3
Example 3

Summary:

To sum up, hope this tutorial guided you to learn the usage of DEC2OCT Function in Excel 365 with its syntax, definition, and examples. Share your feedback in the comment section. Thanks for visiting Geek Excel. Keep Learning!!

Similar Functions:

Keep Reading:

Top comments (0)