Microsoft Office Development and Consultancy
 Home|

Excel

|VBA|C#|Finance|Tools|Newsletter|Feedback|Contact 
 Excel > Functions > Engineering > DEC2OCT

 

DEC2OCT(number [,places])

 
 Returns the number converted from decimal to octal.

 numberThe decimal integer you want to convert.
 places(Optional) The number of characters to use.

 REMARKS
 
  • In Excel 2007 (and later) this function has been removed from the Analysis ToolPak add-in and is available as standard.
     
  • In Excel 2003 this function is only available when you have the Analysis ToolPak add-in loaded.
     
  • If any of the arguments are not numeric, then #VALUE! is returned.
     
  • If "number" < -536,870,912, then #NUM! is returned.
     
  • If "number" > 536,870,911, then #NUM! is returned.
     
  • If "number" < 0, then "places" is ignored and a 10-character (30-bit) octal number is returned. The first bit is the sign.
     
  • If "number" < 0, then two's-complement notation is used to represent the number.
     
  • If "places" is not an integer, it is truncated.
     
  • If "places" < 0, then #NUM! is returned.
     
  • If "places" is left blank, then the minimum number of characters necessary.
     
  • The "places" is useful for padding the return value with leading 0s.
     
  • If "places" is less than the number of characters, then #NUM! is returned.

     EXAMPLES
     
     A
    1=DEC2OCT(58,3) = 072
    2=DEC2OCT(-100,2) = 7777777634
    3=DEC2OCT(-100) = 7777777634
    4=DEC2OCT(100,5) = 00144
    5=DEC2OCT(-100,5) = 7777777634
    6=DEC2OCT(-100,-2) = #NUM!
    7=DEC2OCT(100,2) = #NUM!
    8=DEC2OCT("some text",10) = #VALUE!
    9=DEC2OCT(10,"some text") = #VALUE!
     

     Functions - D | Index - D | Office Online 2013 | 2010 | 2007 | 2003 

     © 2013 Better Solutions Limited. All Rights Reserved.Top | 03-Jan-2013