Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions > Engineering > DEC2OCT

 

DEC2OCT(number [,places])

 
 Returns the number converted from decimal to octal.

 numberThe decimal integer you want to convert.
 placesThe number of characters to use.

 REMARKS
 
  • This function is only available if you have the Analysis ToolPak add-in installed.
     
  • 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 

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.Top