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

 

OCT2HEX(number [,places])

 
 Returns the number converted from octal to hexadecimal.

 numberThe octal number 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.
     
  • Number may not contain more than 10 octal characters (30 bits). The most significant bit of number is the sign bit. The remaining 29 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
     
  • If "number" < 0, OCT2HEX ignores places and returns a 10-character hexadecimal number.
     
  • If "number" is not a valid octal number, then #NUM! is returned.
     
  • If "places" is not an integer, it is truncated.
     
  • If "places" is not numeric, then #VALUE! is returned.
     
  • If "places" < 0, then #NUM! is returned.
     
  • If "places" is left blank, then the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).
     
  • If "places" is not enough characters, then #NUM! is returned.

     EXAMPLES
     
     A
    1=OCT2HEX(100,4) = 40
    2=OCT2HEX(7777777533) = FFFFFFFF5B
    3=OCT2HEX(-10) = #NUM!
    4=OCT2HEX(2,"some text") = #VALUE!
     

     Functions - O | Index - O | Office Online 

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