[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

OCT2DEC

Syntax:

OCT2DEC ( number )

Description: Makes the decimal equivalent of number.

Arguments:

Name

Type

Description

number

number

A 10-digit octal number in a string that is to be converted to a decimal number. If number has less than 10 digits, leading zero digits are implied until it has exactly 10 digits. The 10 digits use twos-complement representation with the left-most bit (30th bit from the right) representing the sign bit.

 

Return Type and Value: number – The decimal equivalent of number.

However, if

number contains one or more non-octal digits, #NUM! is returned.

number contains more than 10 octal digits; that is, number is outside the range "4000000000" (-536,870,912 decimal) to "3777777777" (536,870,911 decimal), inclusive, #NUM! is returned.

[Example:

OCT2DEC("67") results in 55
OCT2DEC("7777777776") results in -2
OCT2DEC("7000000000") results in -134217728

end example]