
In this article
OCT2HEX converts a octal number to hexadecimal. Used for device codes, permission bits, memory addresses and number-system lessons.
Advertisement
Syntax
=OCT2HEX(number, [places])
| Argument | What it means |
|---|---|
number |
Octal number (as text or a number) |
places |
Pad with leading zeros to this length |
Examples
Example 1
=OCT2HEX(A2)
Result: F. See the worked example table below for more cases.
OCT2HEX in practice
Where you will use it
- Reading octal values from device or network logs
- Teaching number systems
- Converting codes for systems that expect hexadecimal
Worked example
| Input | Formula | Result |
|---|---|---|
| 17 | =OCT2HEX(A2) | F |
| 777 | =OCT2HEX(A3) | 1FF |
| 100 | =OCT2HEX(A4) | 40 |
Results calculated in Excel.
Mistakes people make
| Mistake | What to do instead |
|---|---|
| Input too long or invalid digits | #NUM!; check the digits allowed in the base |
| Negative results | Large inputs use two's complement (10 characters) |
Related functions
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
Advertisement
✨ Ask AI about this article
Stuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong