The OCT2DEC function in Google Sheets is a powerful tool designed to facilitate the conversion of signed octal numbers into their decimal counterparts. This function is especially useful for those working in programming and data analysis where different number systems are often utilized.
Syntax
OCT2DEC(octal_number)
- octal_number: The signed octal number you wish to convert to decimal format. This input can be provided as a string or a reference to a cell containing the octal value.
Example #1
=OCT2DEC("17")
This function call converts the octal number 17 to decimal format, yielding a result of 15.
Example #2
=OCT2DEC("-10")
Here, the function takes the signed octal number -10 and converts it to decimal, resulting in -8.
Example #3
=OCT2DEC("25")
In this instance, the input octal number 25 is converted to its decimal equivalent, resulting in 21.
Error handling
- NUM!: This error occurs when the provided octal number is invalid or exceeds the maximum range for a signed octal value.
- VALUE!: This error indicates that the input is not recognized as a valid octal format, typically due to inclusion of non-octal characters.
- REF!: This error arises when the formula references a cell that is not valid—like a removed or non-existent cell.