Engineering

OCT2HEX Function in Excel

Converts an octal number to hexadecimal.

Syntax

  • =OCT2HEX(number, [places])

Arguments

  • number (required): Octal number
  • places (optional): Number of characters to use

Examples

  • =OCT2HEX(100, 4) - Octal to hex - Result: 0040

OCT2HEX in technical sheets

  • Document units in adjacent cells — many engineering functions require exact unit strings.
  • Use [CONVERT](/functions/convert/) for unit changes before specialized formulas.
  • Validate inputs with [ISNUMBER](/functions/isnumber/) and range checks.

Common errors

  • #NUM! if not valid octal

Use cases

  • Number conversion
  • Programming
  • Data processing

Frequently asked questions

  • What is the OCT2HEX function in Excel? OCT2HEX converts an octal number to hexadecimal. The syntax is =OCT2HEX(number, [places]). Typical use cases include number conversion, programming, data processing.
  • How do I use the OCT2HEX function? To use OCT2HEX, type =OCT2HEX( in a cell and provide the required arguments. Excel will show you the syntax and parameter hints as you type. Make sure to close the parentheses and press Enter to execute the function.
  • Why is OCT2HEX not working in my Excel? Common issues with OCT2HEX include #NUM! if not valid octal. Start by checking the syntax =OCT2HEX(number, [places]), then verify each referenced cell or range.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.