# OCT2HEX Function

> Convert an octal number to hexadecimal with OCT2HEX in TX Sheet Control: two's complement negatives, padding with places and #NUM! errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > OCT2HEX Function
- **206 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/oct2hex/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/oct2hex/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/oct2hex/llms-full.txt

---

Convert an octal number to hexadecimal. `number` is an octal number of up to 10 digits; negative numbers are written in two's complement and return a 10-character hexadecimal number. `places` is the number of characters of the result, padded with leading zeros. A number that is not octal, or a `places` of 0 or too small for the result, returns `#NUM!`.

### Syntax

```text
OCT2HEX(number, places)
```

Category: Engineering. Minimum arguments: 1. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=OCT2HEX(10)
```

The formula returns `8`.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [OCT2DEC Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/oct2dec/llms-full.txt)
- **Next:** [ODD Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/odd/llms-full.txt)
